content
stringlengths
4
1.04M
lang
stringclasses
358 values
score
int64
0
5
repo_name
stringlengths
5
114
repo_path
stringlengths
4
229
repo_licenses
listlengths
1
8
KIDS Distribution saved on Jul 14, 2021@12:40:17 Test Patch SAMI*18.0*12 SEQ #12 T3 (1.18.0.12-t3+i12) **KIDS**:SAMI*18.0*12^ **INSTALL NAME** SAMI*18.0*12 "BLD",11510,0) SAMI*18.0*12^SAMI^0^3210714^n "BLD",11510,4,0) ^9.64PA^311.14^2 "BLD",11510,4,311.12,0) 311.12 "BLD",11510,4,311.12,222) y^y^f^^^^n "BLD",11510,4,311.14,0) 311.14 "BLD",11510,4,311.14,222) y^y^f^^n^^y^o^n "BLD",11510,4,"B",311.12,311.12) "BLD",11510,4,"B",311.14,311.14) "BLD",11510,6) 3^12 "BLD",11510,6.3) 6 "BLD",11510,"INID") ^n "BLD",11510,"INIT") POS1812^SAMIPAT "BLD",11510,"KRN",0) ^9.67PA^1.5^25 "BLD",11510,"KRN",.4,0) .4 "BLD",11510,"KRN",.401,0) .401 "BLD",11510,"KRN",.402,0) .402 "BLD",11510,"KRN",.403,0) .403 "BLD",11510,"KRN",.5,0) .5 "BLD",11510,"KRN",.84,0) .84 "BLD",11510,"KRN",1.5,0) 1.5 "BLD",11510,"KRN",1.6,0) 1.6 "BLD",11510,"KRN",1.61,0) 1.61 "BLD",11510,"KRN",1.62,0) 1.62 "BLD",11510,"KRN",3.6,0) 3.6 "BLD",11510,"KRN",3.8,0) 3.8 "BLD",11510,"KRN",9.2,0) 9.2 "BLD",11510,"KRN",9.8,0) 9.8 "BLD",11510,"KRN",9.8,"NM",0) ^9.68A^22^22 "BLD",11510,"KRN",9.8,"NM",1,0) SAMICAS2^^0^B443014182 "BLD",11510,"KRN",9.8,"NM",2,0) SAMICAS3^^0^B495988167 "BLD",11510,"KRN",9.8,"NM",3,0) SAMICASE^^0^B2476673 "BLD",11510,"KRN",9.8,"NM",4,0) SAMICLOG^^0^B37383898 "BLD",11510,"KRN",9.8,"NM",5,0) SAMICUL^^0^B144065 "BLD",11510,"KRN",9.8,"NM",6,0) SAMIHOM3^^0^B168256875 "BLD",11510,"KRN",9.8,"NM",7,0) SAMIHOM4^^0^B899962251 "BLD",11510,"KRN",9.8,"NM",8,0) SAMIHUL^^0^B121785 "BLD",11510,"KRN",9.8,"NM",9,0) SAMIJS1^^0^B33800885 "BLD",11510,"KRN",9.8,"NM",10,0) SAMIJS2^^0^B50763648 "BLD",11510,"KRN",9.8,"NM",11,0) SAMINOT1^^0^B476873160 "BLD",11510,"KRN",9.8,"NM",12,0) SAMINOT2^^0^B473986639 "BLD",11510,"KRN",9.8,"NM",13,0) SAMINUL^^0^B108214 "BLD",11510,"KRN",9.8,"NM",14,0) SAMIORM^^0^B175905084 "BLD",11510,"KRN",9.8,"NM",15,0) SAMIOUL^^0^B103895 "BLD",11510,"KRN",9.8,"NM",16,0) SAMIPARM^^0^B7351392 "BLD",11510,"KRN",9.8,"NM",17,0) SAMIPAT^^0^B576661 "BLD",11510,"KRN",9.8,"NM",18,0) SAMISITE^^0^B91065013 "BLD",11510,"KRN",9.8,"NM",19,0) SAMITTW^^0^B5460827 "BLD",11510,"KRN",9.8,"NM",20,0) SAMIUR^^0^B504449514 "BLD",11510,"KRN",9.8,"NM",21,0) SAMIUR2^^0^B1203305457 "BLD",11510,"KRN",9.8,"NM",22,0) SAMIURUL^^0^B108116 "BLD",11510,"KRN",9.8,"NM","B","SAMICAS2",1) "BLD",11510,"KRN",9.8,"NM","B","SAMICAS3",2) "BLD",11510,"KRN",9.8,"NM","B","SAMICASE",3) "BLD",11510,"KRN",9.8,"NM","B","SAMICLOG",4) "BLD",11510,"KRN",9.8,"NM","B","SAMICUL",5) "BLD",11510,"KRN",9.8,"NM","B","SAMIHOM3",6) "BLD",11510,"KRN",9.8,"NM","B","SAMIHOM4",7) "BLD",11510,"KRN",9.8,"NM","B","SAMIHUL",8) "BLD",11510,"KRN",9.8,"NM","B","SAMIJS1",9) "BLD",11510,"KRN",9.8,"NM","B","SAMIJS2",10) "BLD",11510,"KRN",9.8,"NM","B","SAMINOT1",11) "BLD",11510,"KRN",9.8,"NM","B","SAMINOT2",12) "BLD",11510,"KRN",9.8,"NM","B","SAMINUL",13) "BLD",11510,"KRN",9.8,"NM","B","SAMIORM",14) "BLD",11510,"KRN",9.8,"NM","B","SAMIOUL",15) "BLD",11510,"KRN",9.8,"NM","B","SAMIPARM",16) "BLD",11510,"KRN",9.8,"NM","B","SAMIPAT",17) "BLD",11510,"KRN",9.8,"NM","B","SAMISITE",18) "BLD",11510,"KRN",9.8,"NM","B","SAMITTW",19) "BLD",11510,"KRN",9.8,"NM","B","SAMIUR",20) "BLD",11510,"KRN",9.8,"NM","B","SAMIUR2",21) "BLD",11510,"KRN",9.8,"NM","B","SAMIURUL",22) "BLD",11510,"KRN",19,0) 19 "BLD",11510,"KRN",19,"NM",0) ^9.68A^^ "BLD",11510,"KRN",19.1,0) 19.1 "BLD",11510,"KRN",101,0) 101 "BLD",11510,"KRN",409.61,0) 409.61 "BLD",11510,"KRN",771,0) 771 "BLD",11510,"KRN",779.2,0) 779.2 "BLD",11510,"KRN",870,0) 870 "BLD",11510,"KRN",8989.51,0) 8989.51 "BLD",11510,"KRN",8989.52,0) 8989.52 "BLD",11510,"KRN",8993,0) 8993 "BLD",11510,"KRN",8994,0) 8994 "BLD",11510,"KRN","B",.4,.4) "BLD",11510,"KRN","B",.401,.401) "BLD",11510,"KRN","B",.402,.402) "BLD",11510,"KRN","B",.403,.403) "BLD",11510,"KRN","B",.5,.5) "BLD",11510,"KRN","B",.84,.84) "BLD",11510,"KRN","B",1.5,1.5) "BLD",11510,"KRN","B",1.6,1.6) "BLD",11510,"KRN","B",1.61,1.61) "BLD",11510,"KRN","B",1.62,1.62) "BLD",11510,"KRN","B",3.6,3.6) "BLD",11510,"KRN","B",3.8,3.8) "BLD",11510,"KRN","B",9.2,9.2) "BLD",11510,"KRN","B",9.8,9.8) "BLD",11510,"KRN","B",19,19) "BLD",11510,"KRN","B",19.1,19.1) "BLD",11510,"KRN","B",101,101) "BLD",11510,"KRN","B",409.61,409.61) "BLD",11510,"KRN","B",771,771) "BLD",11510,"KRN","B",779.2,779.2) "BLD",11510,"KRN","B",870,870) "BLD",11510,"KRN","B",8989.51,8989.51) "BLD",11510,"KRN","B",8989.52,8989.52) "BLD",11510,"KRN","B",8993,8993) "BLD",11510,"KRN","B",8994,8994) "BLD",11510,"QUES",0) ^9.62^^ "BLD",11510,"REQB",0) ^9.611^10^10 "BLD",11510,"REQB",1,0) SAMI*18.0*1^0 "BLD",11510,"REQB",2,0) SAMI*18.0*2^0 "BLD",11510,"REQB",3,0) SAMI*18.0*3^0 "BLD",11510,"REQB",4,0) SAMI*18.0*4^0 "BLD",11510,"REQB",5,0) SAMI 18.0T05^0 "BLD",11510,"REQB",6,0) SAMI*18.0*6^0 "BLD",11510,"REQB",7,0) SAMI*18.0*8^0 "BLD",11510,"REQB",8,0) SAMI*18.0*9^0 "BLD",11510,"REQB",9,0) SAMI*18.0*10^0 "BLD",11510,"REQB",10,0) SAMI*18.0*11^0 "BLD",11510,"REQB","B","SAMI 18.0T05",5) "BLD",11510,"REQB","B","SAMI*18.0*1",1) "BLD",11510,"REQB","B","SAMI*18.0*10",9) "BLD",11510,"REQB","B","SAMI*18.0*11",10) "BLD",11510,"REQB","B","SAMI*18.0*2",2) "BLD",11510,"REQB","B","SAMI*18.0*3",3) "BLD",11510,"REQB","B","SAMI*18.0*4",4) "BLD",11510,"REQB","B","SAMI*18.0*6",6) "BLD",11510,"REQB","B","SAMI*18.0*8",7) "BLD",11510,"REQB","B","SAMI*18.0*9",8) "DATA",311.14,1,0) Non VA "DATA",311.14,1,1,0) ^311.141^5^5 "DATA",311.14,1,1,1,0) socialSecurityNumber^Patient ID "DATA",311.14,1,1,2,0) socialSecurityNumber.short^PID "DATA",311.14,1,1,3,0) socialSecurityNumber.mask "DATA",311.14,1,1,4,0) socialSecurityNumber.regex "DATA",311.14,1,1,5,0) matchingReportEnabled^false "DATA",311.14,2,0) VHA "DATA",311.14,2,1,0) ^311.141^5^5 "DATA",311.14,2,1,1,0) socialSecurityNumber^Social Security Number "DATA",311.14,2,1,2,0) socialSecurityNumber.short^SSN "DATA",311.14,2,1,3,0) socialSecurityNumber.mask^000-00-0000 "DATA",311.14,2,1,4,0) socialSecurityNumber.regex^`(?!(000|666|9(?!99)))\d{3}-(?!00)\d{2}-(?!0000)\d{4}$ "DATA",311.14,2,1,5,0) matchingReportEnabled^false "FIA",311.12) SAMI SITE "FIA",311.12,0) ^SAMI(311.12, "FIA",311.12,0,0) 311.12PI "FIA",311.12,0,1) y^y^f^^^^n "FIA",311.12,0,10) "FIA",311.12,0,11) "FIA",311.12,0,"RLRO") "FIA",311.12,0,"VR") 18.0^SAMI "FIA",311.12,311.12) 0 "FIA",311.12,311.121) 0 "FIA",311.14) SAMI PARAMETER DEFAULTS "FIA",311.14,0) ^SAMI(311.14, "FIA",311.14,0,0) 311.14 "FIA",311.14,0,1) y^y^f^^n^^y^o^n "FIA",311.14,0,10) "FIA",311.14,0,11) "FIA",311.14,0,"RLRO") "FIA",311.14,0,"VR") 18.0^SAMI "FIA",311.14,311.14) 0 "FIA",311.14,311.141) 0 "INIT") POS1812^SAMIPAT "IX",311.12,311.12,"D",0) 311.12^D^PARAMETER VALUES^MU^^F^IR^W^311.121^^^^^LS "IX",311.12,311.12,"D",1) S ^SAMI(311.12,"D",X(1),X(3))=$TR(X(2),"`","^") "IX",311.12,311.12,"D",2) K ^SAMI(311.12,"D",X(1),X(3)) "IX",311.12,311.12,"D",2.5) K ^SAMI(311.12,"D") "IX",311.12,311.12,"D",11.1,0) ^.114IA^3^3 "IX",311.12,311.12,"D",11.1,1,0) 1^C^^^30^1 "IX",311.12,311.12,"D",11.1,1,1.5) S X=$$GET1^DIQ(311.12,DA(1)_",",.02) "IX",311.12,311.12,"D",11.1,2,0) 2^C "IX",311.12,311.12,"D",11.1,2,1.5) S X=$$GET1^DIQ(311.121,DA_","_DA(1)_",",.02) "IX",311.12,311.12,"D",11.1,3,0) 3^F^311.121^.01^30^2^F "IX",311.12,311.12,"SYM",0) 311.12^SYM^REGULAR XREF ON THE SYMBOL FIELD^R^^F^IR^I^311.12^^^^^LS "IX",311.12,311.12,"SYM",1) S ^SAMI(311.12,"SYM",$E(X,1,3),DA)="" "IX",311.12,311.12,"SYM",2) K ^SAMI(311.12,"SYM",$E(X,1,3),DA) "IX",311.12,311.12,"SYM",2.5) K ^SAMI(311.12,"SYM") "IX",311.12,311.12,"SYM",11.1,0) ^.114IA^1^1 "IX",311.12,311.12,"SYM",11.1,1,0) 1^F^311.12^.02^3^1^F "IX",311.14,311.14,"D",0) 311.14^D^PARMS^MU^^F^IR^W^311.141^^^^^LS "IX",311.14,311.14,"D",1) S ^SAMI(311.14,"D",X(1),X(3))=$TR(X(2),"`","^") "IX",311.14,311.14,"D",2) K ^SAMI(311.14,"D",X(1)) "IX",311.14,311.14,"D",2.5) K ^SAMI(311.14,"D") "IX",311.14,311.14,"D",11.1,0) ^.114IA^3^3 "IX",311.14,311.14,"D",11.1,1,0) 1^C^^^30^1 "IX",311.14,311.14,"D",11.1,1,1.5) S X=$$GET1^DIQ(311.14,DA(1)_",",.01) "IX",311.14,311.14,"D",11.1,2,0) 2^C "IX",311.14,311.14,"D",11.1,2,1.5) S X=$$GET1^DIQ(311.141,DA_","_DA(1)_",",.02) "IX",311.14,311.14,"D",11.1,3,0) 3^F^311.141^.01^^2^F "IX",311.14,311.14,"D",11.1,3,3) "MBREQ") 0 "PKG",230,-1) 1^1 "PKG",230,0) SAMI^SAMI^SCREENING APPLICATIONS MANAGEMENT - IELCAP "PKG",230,22,0) ^9.49I^1^1 "PKG",230,22,1,0) 18.0^3191203 "PKG",230,22,1,"PAH",1,0) 12^3210714^66 "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") 22 "RTN","SAMICAS2") 0^1^B443014182 "RTN","SAMICAS2",1,0) SAMICAS2 ;ven/gpl - case review cont ;2021-07-01t15:42z "RTN","SAMICAS2",2,0) ;;18.0;SAMI;**1,5,9,12**;2020-01;Build 6 "RTN","SAMICAS2",3,0) ;;1.18.0.12-t3+i12 "RTN","SAMICAS2",4,0) ; "RTN","SAMICAS2",5,0) ; SAMICAS2 contains ppis and other subroutines to support processing "RTN","SAMICAS2",6,0) ; of the VAPALS case review page. "RTN","SAMICAS2",7,0) ; "RTN","SAMICAS2",8,0) quit ; no entry from top "RTN","SAMICAS2",9,0) ; "RTN","SAMICAS2",10,0) ; "RTN","SAMICAS2",11,0) ; "RTN","SAMICAS2",12,0) ;@section 0 primary development "RTN","SAMICAS2",13,0) ; "RTN","SAMICAS2",14,0) ; "RTN","SAMICAS2",15,0) ; "RTN","SAMICAS2",16,0) ;@routine-credits "RTN","SAMICAS2",17,0) ;@license see routine SAMIUL "RTN","SAMICAS2",18,0) ;@documentation see SAMICUL "RTN","SAMICAS2",19,0) ;@contents "RTN","SAMICAS2",20,0) ; WSCASE wri-code WSCASE^SAMICASE, post vapals casereview: "RTN","SAMICAS2",21,0) ; generate case review page "RTN","SAMICAS2",22,0) ; $$NOTEHREF ppi-code $$NOTEHREF^SAMICASE, "RTN","SAMICAS2",23,0) ; html list of notes for form "RTN","SAMICAS2",24,0) ; GETTMPL ppi-code GETTMPL^SAMICASE, get html template "RTN","SAMICAS2",25,0) ; $$CNTITEMS = # forms patient has used before deleting patient "RTN","SAMICAS2",26,0) ; GETITEMS ppi-code GETITEMS^SAMICASE "RTN","SAMICAS2",27,0) ; get items available for studyid "RTN","SAMICAS2",28,0) ; $$GETDTKEY date part of form key "RTN","SAMICAS2",29,0) ; $$KEY2DSPD date in elcap format from key date "RTN","SAMICAS2",30,0) ; $$VAPALSDT ppi-code $$VAPALSDT^SAMICASE, vapals format for dates "RTN","SAMICAS2",31,0) ; "RTN","SAMICAS2",32,0) ; WSNUFORM wri-code WSNUFORM^SAMICASE, post vapals nuform: "RTN","SAMICAS2",33,0) ; new form for patient "RTN","SAMICAS2",34,0) ; $$KEY2FM ppi-code $$KEY2FM^SAMICASE, convert key to fileman date "RTN","SAMICAS2",35,0) ; "RTN","SAMICAS2",36,0) ; $$GSAMISTA value of 'samistatus' from form "RTN","SAMICAS2",37,0) ; SSAMISTA ppi-code SSAMISTA^SAMICASE, set samistatus to val in form "RTN","SAMICAS2",38,0) ; DELFORM wri-code DELFORM^SAMICASE, post vapals deleteform: "RTN","SAMICAS2",39,0) ; delete incomplete form "RTN","SAMICAS2",40,0) ; INITSTAT set all forms to 'incomplete' "RTN","SAMICAS2",41,0) ; "RTN","SAMICAS2",42,0) ; "RTN","SAMICAS2",43,0) ; "RTN","SAMICAS2",44,0) ;@section 1 wsCASE & related ppis "RTN","SAMICAS2",45,0) ; "RTN","SAMICAS2",46,0) ; "RTN","SAMICAS2",47,0) ; "RTN","SAMICAS2",48,0) ;@wri-code WSCASE^SAMICASE "RTN","SAMICAS2",49,0) WSCASE ; post vapals casereview: generate case review page "RTN","SAMICAS2",50,0) ; "RTN","SAMICAS2",51,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMICAS2",52,0) ; "RTN","SAMICAS2",53,0) ;ven/gpl;wri;procedure;silent;clean;sac;??% tests "RTN","SAMICAS2",54,0) ;@signature "RTN","SAMICAS2",55,0) ; do WSCASE^SAMICASE(rtn,filter) "RTN","SAMICAS2",56,0) ;@branches-from "RTN","SAMICAS2",57,0) ; WSCASE^SAMICASE "RTN","SAMICAS2",58,0) ;@wri-called-by "RTN","SAMICAS2",59,0) ; wsPostForm^%wfhform "RTN","SAMICAS2",60,0) ; DELFORM^SAMICASE "RTN","SAMICAS2",61,0) ; WSNFPOST^SAMICASE "RTN","SAMICAS2",62,0) ; WSVAPALS^SAMIHOM3 [wsi for ws post vapals] "RTN","SAMICAS2",63,0) ; WSLOOKUP^SAMISRC2 "RTN","SAMICAS2",64,0) ; wsPostForm^SAMIZ2 "RTN","SAMICAS2",65,0) ;@called-by none "RTN","SAMICAS2",66,0) ;@calls "RTN","SAMICAS2",67,0) ; $$setroot^%wd "RTN","SAMICAS2",68,0) ; GETTMPL^SAMICASE "RTN","SAMICAS2",69,0) ; GETITEMS^SAMICASE "RTN","SAMICAS2",70,0) ; $$SID2NUM^SAMIHOM3 "RTN","SAMICAS2",71,0) ; findReplace^%ts "RTN","SAMICAS2",72,0) ; FIXHREF^SAMIFORM "RTN","SAMICAS2",73,0) ; FIXSRC^SAMIFORM "RTN","SAMICAS2",74,0) ; $$GETDTKEY "RTN","SAMICAS2",75,0) ; $$KEY2DSPD "RTN","SAMICAS2",76,0) ; $$GETLAST5^SAMIFORM "RTN","SAMICAS2",77,0) ; $$GETSSN^SAMIFORM "RTN","SAMICAS2",78,0) ; $$GETNAME^SAMIFORM "RTN","SAMICAS2",79,0) ; $$GSAMISTA "RTN","SAMICAS2",80,0) ; D ADDCRLF^VPRJRUT "RTN","SAMICAS2",81,0) ;@input "RTN","SAMICAS2",82,0) ; .filter = "RTN","SAMICAS2",83,0) ; .filter("studyid")=studyid of the patient "RTN","SAMICAS2",84,0) ;@output "RTN","SAMICAS2",85,0) ; .rtn "RTN","SAMICAS2",86,0) ;@tests "RTN","SAMICAS2",87,0) ; UTWSCAS^SAMIUTS2 "RTN","SAMICAS2",88,0) ; "RTN","SAMICAS2",89,0) ; "RTN","SAMICAS2",90,0) ;@stanza 2 initialize "RTN","SAMICAS2",91,0) ; "RTN","SAMICAS2",92,0) kill rtn "RTN","SAMICAS2",93,0) ; "RTN","SAMICAS2",94,0) new groot set groot=$$setroot^%wd("vapals-patients") ; root of patient graphs "RTN","SAMICAS2",95,0) ; "RTN","SAMICAS2",96,0) new temp ; html template "RTN","SAMICAS2",97,0) do GETTMPL^SAMICASE("temp","vapals:casereview") "RTN","SAMICAS2",98,0) quit:'$data(temp) "RTN","SAMICAS2",99,0) ; "RTN","SAMICAS2",100,0) new sid set sid=$get(filter("studyid")) "RTN","SAMICAS2",101,0) if sid="" set sid=$get(filter("studyId")) "RTN","SAMICAS2",102,0) if sid="" set sid=$get(filter("fvalue")) "RTN","SAMICAS2",103,0) quit:sid="" "RTN","SAMICAS2",104,0) ; "RTN","SAMICAS2",105,0) new items "RTN","SAMICAS2",106,0) do GETITEMS^SAMICASE("items",sid) "RTN","SAMICAS2",107,0) quit:'$data(items) "RTN","SAMICAS2",108,0) ; "RTN","SAMICAS2",109,0) new gien set gien=$$SID2NUM^SAMIHOM3(sid) ; graph ien "RTN","SAMICAS2",110,0) new name set name=$get(@groot@(gien,"saminame")) "RTN","SAMICAS2",111,0) quit:name="" "RTN","SAMICAS2",112,0) new fname set fname=$piece(name,",",2) "RTN","SAMICAS2",113,0) new lname set lname=$piece(name,",") "RTN","SAMICAS2",114,0) ; "RTN","SAMICAS2",115,0) ; "RTN","SAMICAS2",116,0) ;@stanza 3 change resource paths to /see/ "RTN","SAMICAS2",117,0) ; "RTN","SAMICAS2",118,0) new cnt set cnt=0 "RTN","SAMICAS2",119,0) new zi set zi=0 "RTN","SAMICAS2",120,0) ;for set zi=$order(temp(zi)) quit:+zi=0 quit:temp(zi)["VEP0001" do ; "RTN","SAMICAS2",121,0) for set zi=$order(temp(zi)) quit:+zi=0 quit:temp(zi)["tbody" do ; "RTN","SAMICAS2",122,0) . new ln set ln=temp(zi) "RTN","SAMICAS2",123,0) . new touched set touched=0 "RTN","SAMICAS2",124,0) . ; "RTN","SAMICAS2",125,0) . if ln["@@SITE@@" do ; insert site id "RTN","SAMICAS2",126,0) . . n siteid s siteid=$g(filter("siteid")) "RTN","SAMICAS2",127,0) . . i siteid="" s siteid=$g(filter("site")) "RTN","SAMICAS2",128,0) . . q:siteid="" "RTN","SAMICAS2",129,0) . . do findReplace^%ts(.ln,"@@SITE@@",siteid) "RTN","SAMICAS2",130,0) . . s temp(zi)=ln "RTN","SAMICAS2",131,0) . ; "RTN","SAMICAS2",132,0) . if ln["@@SITETITLE@@" do ; insert site title "RTN","SAMICAS2",133,0) . . n sitetit s sitetit=$g(filter("sitetitle")) "RTN","SAMICAS2",134,0) . . if sitetit="" d ; "RTN","SAMICAS2",135,0) . . . n tsite s tsite=$g(filter("site")) "RTN","SAMICAS2",136,0) . . . q:tsite="" "RTN","SAMICAS2",137,0) . . . s sitetit=$$SITENM2^SAMISITE(tsite)_" - "_tsite "RTN","SAMICAS2",138,0) . . q:sitetit="" "RTN","SAMICAS2",139,0) . . do findReplace^%ts(.ln,"@@SITETITLE@@",sitetit) "RTN","SAMICAS2",140,0) . . s temp(zi)=ln "RTN","SAMICAS2",141,0) . ; "RTN","SAMICAS2",142,0) . if ln["id" if ln["studyIdMenu" do ; "RTN","SAMICAS2",143,0) . . set zi=zi+4 "RTN","SAMICAS2",144,0) . ; "RTN","SAMICAS2",145,0) . if ln["home.html" do ; "RTN","SAMICAS2",146,0) . . do findReplace^%ts(.ln,"home.html","/vapals") "RTN","SAMICAS2",147,0) . . set temp(zi)=ln "RTN","SAMICAS2",148,0) . . set touched=1 "RTN","SAMICAS2",149,0) . ; "RTN","SAMICAS2",150,0) . if ln["href" if 'touched do ; "RTN","SAMICAS2",151,0) . . do FIXHREF^SAMIFORM(.ln) "RTN","SAMICAS2",152,0) . . set temp(zi)=ln "RTN","SAMICAS2",153,0) . ; "RTN","SAMICAS2",154,0) . if ln["src" do ; "RTN","SAMICAS2",155,0) . . do FIXSRC^SAMIFORM(.ln) "RTN","SAMICAS2",156,0) . . set temp(zi)=ln "RTN","SAMICAS2",157,0) . ; "RTN","SAMICAS2",158,0) . if ln["@@ERROR_MESSAGE@@" do ; insert error message "RTN","SAMICAS2",159,0) . . n zerr s zerr=$g(filter("errorMessage")) "RTN","SAMICAS2",160,0) . . i zerr="" q ; "RTN","SAMICAS2",161,0) . . do findReplace^%ts(.ln,"@@ERROR_MESSAGE@@",zerr) "RTN","SAMICAS2",162,0) . . s temp(zi)=ln "RTN","SAMICAS2",163,0) . ; "RTN","SAMICAS2",164,0) . set cnt=cnt+1 "RTN","SAMICAS2",165,0) . set rtn(cnt)=temp(zi) "RTN","SAMICAS2",166,0) . quit "RTN","SAMICAS2",167,0) ; "RTN","SAMICAS2",168,0) ; ready to insert rows for selection "RTN","SAMICAS2",169,0) ; "RTN","SAMICAS2",170,0) ; "RTN","SAMICAS2",171,0) ;@stanza 4 intake form "RTN","SAMICAS2",172,0) ; "RTN","SAMICAS2",173,0) new sikey set sikey=$order(items("sifor")) "RTN","SAMICAS2",174,0) if sikey="" set sikey="siform-2017-12-10" "RTN","SAMICAS2",175,0) new sidate set sidate=$$GETDTKEY(sikey) "RTN","SAMICAS2",176,0) set sikey="vapals:"_sikey "RTN","SAMICAS2",177,0) new sidispdate set sidispdate=$$KEY2DSPD(sidate) "RTN","SAMICAS2",178,0) ;new geturl set geturl="/form?form=vapals:siform&studyid="_sid_"&key="_sikey "RTN","SAMICAS2",179,0) new nuhref set nuhref="<form method=POST action=""/vapals"">" "RTN","SAMICAS2",180,0) set nuhref=nuhref_"<td><input type=hidden name=""samiroute"" value=""nuform"">" "RTN","SAMICAS2",181,0) set nuhref=nuhref_"<input type=hidden name=""studyid"" value="_sid_">" "RTN","SAMICAS2",182,0) set nuhref=nuhref_"<input value=""New Form"" class=""btn label label-warning"" role=""link"" type=""submit""></form></td>" "RTN","SAMICAS2",183,0) ; new intake notes table "RTN","SAMICAS2",184,0) n notehref,form "RTN","SAMICAS2",185,0) set form=$p(sikey,":",2) "RTN","SAMICAS2",186,0) set notehref=$$NOTEHREF^SAMICASE(sid,form) ; table of notes "RTN","SAMICAS2",187,0) set cnt=cnt+1 "RTN","SAMICAS2",188,0) ;new facilitycode set facilitycode=$$GETPRFX^SAMIFORM() "RTN","SAMICAS2",189,0) n siteid s siteid=$g(filter("siteid")) "RTN","SAMICAS2",190,0) i siteid="" s siteid=$g(filter("site")) "RTN","SAMICAS2",191,0) new facilitycode set facilitycode=siteid "RTN","SAMICAS2",192,0) new last5 set last5=$$GETLAST5^SAMIFORM(sid) "RTN","SAMICAS2",193,0) new pssn set pssn=$$GETSSN^SAMIFORM(sid) "RTN","SAMICAS2",194,0) new pname set pname=$$GETNAME^SAMIFORM(sid) "RTN","SAMICAS2",195,0) new useid set useid=pssn "RTN","SAMICAS2",196,0) if useid="" set useid=last5 "RTN","SAMICAS2",197,0) set rtn(cnt)="<tr><td> "_useid_" </td><td> "_pname_" </td><td> "_facilitycode_" </td><td>"_sidispdate_"</td><td>"_$char(13) "RTN","SAMICAS2",198,0) set cnt=cnt+1 "RTN","SAMICAS2",199,0) set rtn(cnt)="<form method=""post"" action=""/vapals"">" "RTN","SAMICAS2",200,0) set cnt=cnt+1 "RTN","SAMICAS2",201,0) set rtn(cnt)="<input name=""samiroute"" value=""form"" type=""hidden"">" "RTN","SAMICAS2",202,0) set rtn(cnt)=rtn(cnt)_" <input name=""studyid"" value="""_sid_""" type=""hidden"">" "RTN","SAMICAS2",203,0) set rtn(cnt)=rtn(cnt)_" <input name=""form"" value="""_sikey_""" type=""hidden"">" "RTN","SAMICAS2",204,0) set rtn(cnt)=rtn(cnt)_" <input value=""Intake"" class=""btn btn-link"" role=""link"" type=""submit"">" "RTN","SAMICAS2",205,0) ; "RTN","SAMICAS2",206,0) new samistatus set samistatus="" "RTN","SAMICAS2",207,0) if $$GSAMISTA(sid,sikey)="incomplete" set samistatus="(incomplete)" "RTN","SAMICAS2",208,0) set cnt=cnt+1 "RTN","SAMICAS2",209,0) set rtn(cnt)="</form>"_samistatus_notehref_"</td>"_$char(13) "RTN","SAMICAS2",210,0) set cnt=cnt+1 "RTN","SAMICAS2",211,0) set rtn(cnt)=nuhref_"</tr>" "RTN","SAMICAS2",212,0) ; "RTN","SAMICAS2",213,0) ; "RTN","SAMICAS2",214,0) ;@stanza 6 rest of the forms "RTN","SAMICAS2",215,0) ; "RTN","SAMICAS2",216,0) new zj set zj="" ; each of the rest of the forms "RTN","SAMICAS2",217,0) if $data(items("sort")) do ; we have more forms "RTN","SAMICAS2",218,0) . for set zj=$order(items("sort",zj)) quit:zj="" do ; "RTN","SAMICAS2",219,0) . . new cdate set cdate=zj "RTN","SAMICAS2",220,0) . . new zk set zk="" "RTN","SAMICAS2",221,0) . . for set zk=$order(items("sort",cdate,zk)) q:zk="" do ; "RTN","SAMICAS2",222,0) . . . new zform set zform=zk "RTN","SAMICAS2",223,0) . . . new zkey set zkey=$order(items("sort",cdate,zform,"")) "RTN","SAMICAS2",224,0) . . . new zname set zname=$order(items("sort",cdate,zform,zkey,"")) "RTN","SAMICAS2",225,0) . . . new dispdate set dispdate=$$KEY2DSPD(cdate) "RTN","SAMICAS2",226,0) . . . set zform="vapals:"_zkey ; all the new forms are vapals:key "RTN","SAMICAS2",227,0) . . . ;new geturl set geturl="/form?form="_zform_"&studyid="_sid_"&key="_zkey "RTN","SAMICAS2",228,0) . . . set cnt=cnt+1 "RTN","SAMICAS2",229,0) . . . ;set rtn(cnt)="<tr><td> "_sid_" </td><td> - </td><td> - </td><td> - </td><td>"_dispdate_"</td><td>" "RTN","SAMICAS2",230,0) . . . set rtn(cnt)="<tr><td> "_useid_" </td><td> - </td><td> - </td><td>"_dispdate_"</td><td>" "RTN","SAMICAS2",231,0) . . . set cnt=cnt+1 "RTN","SAMICAS2",232,0) . . . set rtn(cnt)="<form method=""post"" action=""/vapals"">"_$char(13) "RTN","SAMICAS2",233,0) . . . set cnt=cnt+1 "RTN","SAMICAS2",234,0) . . . set rtn(cnt)="<input name=""samiroute"" value=""form"" type=""hidden"">"_$char(13) "RTN","SAMICAS2",235,0) . . . set cnt=cnt+1 "RTN","SAMICAS2",236,0) . . . set rtn(cnt)=" <input name=""studyid"" value="""_sid_""" type=""hidden"">"_$char(13) "RTN","SAMICAS2",237,0) . . . set cnt=cnt+1 "RTN","SAMICAS2",238,0) . . . set rtn(cnt)=" <input name=""form"" value="""_zform_""" type=""hidden"">"_$char(13) "RTN","SAMICAS2",239,0) . . . set cnt=cnt+1 "RTN","SAMICAS2",240,0) . . . set rtn(cnt)=" <input value="""_zname_""" class=""btn btn-link"" role=""link"" type=""submit"">"_$char(13) "RTN","SAMICAS2",241,0) . . . ; "RTN","SAMICAS2",242,0) . . . new samistatus set samistatus="" "RTN","SAMICAS2",243,0) . . . if $$GSAMISTA(sid,zform)="incomplete" set samistatus="(incomplete)" "RTN","SAMICAS2",244,0) . . . set cnt=cnt+1 "RTN","SAMICAS2",245,0) . . . set rtn(cnt)="</form>"_samistatus_$$NOTEHREF^SAMICASE(sid,zkey)_"</td>" "RTN","SAMICAS2",246,0) . . . set cnt=cnt+1 "RTN","SAMICAS2",247,0) . . . if zform["ceform" do ; "RTN","SAMICAS2",248,0) . . . . new rpthref set rpthref="<form method=POST action=""/vapals"">" "RTN","SAMICAS2",249,0) . . . . set rpthref=rpthref_"<td><input type=hidden name=""samiroute"" value=""ctreport"">" "RTN","SAMICAS2",250,0) . . . . set rpthref=rpthref_"<input type=hidden name=""form"" value="_$p(zform,":",2)_">" "RTN","SAMICAS2",251,0) . . . . set rpthref=rpthref_"<input type=hidden name=""studyid"" value="_sid_">" "RTN","SAMICAS2",252,0) . . . . set rpthref=rpthref_"<input value=""Report"" class=""btn label label-warning"" role=""link"" type=""submit""></form></td>" "RTN","SAMICAS2",253,0) . . . . set rtn(cnt)=rpthref_"</tr>" "RTN","SAMICAS2",254,0) . . . . ;set rtn(cnt)="</tr>" ; turn off report "RTN","SAMICAS2",255,0) . . . else set rtn(cnt)="<td></td></tr>" "RTN","SAMICAS2",256,0) . . . quit "RTN","SAMICAS2",257,0) . . quit "RTN","SAMICAS2",258,0) . quit "RTN","SAMICAS2",259,0) ; "RTN","SAMICAS2",260,0) ; "RTN","SAMICAS2",261,0) ;@stanza 7 skip ahead in template to tbody "RTN","SAMICAS2",262,0) ; "RTN","SAMICAS2",263,0) new loc set loc=zi+1 "RTN","SAMICAS2",264,0) for set zi=$order(temp(zi)) quit:+zi=0 quit:temp(zi)["/tbody" do ; "RTN","SAMICAS2",265,0) . set x=$get(x) "RTN","SAMICAS2",266,0) . quit "RTN","SAMICAS2",267,0) set zi=zi-1 "RTN","SAMICAS2",268,0) ; "RTN","SAMICAS2",269,0) ; "RTN","SAMICAS2",270,0) ;@stanza 8 rest of lines "RTN","SAMICAS2",271,0) ; "RTN","SAMICAS2",272,0) for set zi=$order(temp(zi)) quit:+zi=0 do ; "RTN","SAMICAS2",273,0) . new line "RTN","SAMICAS2",274,0) . set line=temp(zi) "RTN","SAMICAS2",275,0) . ; "RTN","SAMICAS2",276,0) . if line["@@SITE@@" do ; insert site id "RTN","SAMICAS2",277,0) . . n siteid s siteid=$g(filter("siteid")) "RTN","SAMICAS2",278,0) . . i siteid="" s siteid=$g(filter("site")) "RTN","SAMICAS2",279,0) . . q:siteid="" "RTN","SAMICAS2",280,0) . . do findReplace^%ts(.line,"@@SITE@@",siteid) "RTN","SAMICAS2",281,0) . ; "RTN","SAMICAS2",282,0) . if line["@@SITETITLE@@" do ; insert site title "RTN","SAMICAS2",283,0) . . n sitetit s sitetit=$g(filter("sitetitle")) "RTN","SAMICAS2",284,0) . . if sitetit="" d ; "RTN","SAMICAS2",285,0) . . . n tsite s tsite=$g(filter("site")) "RTN","SAMICAS2",286,0) . . . q:tsite="" "RTN","SAMICAS2",287,0) . . . s sitetit=$$SITENM2^SAMISITE(tsite)_" - "_tsite "RTN","SAMICAS2",288,0) . . q:sitetit="" "RTN","SAMICAS2",289,0) . . do findReplace^%ts(.line,"@@SITETITLE@@",sitetit) "RTN","SAMICAS2",290,0) . ; "RTN","SAMICAS2",291,0) . if line["XX0002" do ; "RTN","SAMICAS2",292,0) . . do findReplace^%ts(.line,"XX0002",sid) "RTN","SAMICAS2",293,0) . ; "RTN","SAMICAS2",294,0) . if line["@@ERROR_MESSAGE@@" do ; "RTN","SAMICAS2",295,0) . . n zerr "RTN","SAMICAS2",296,0) . . k ^gpl("error") "RTN","SAMICAS2",297,0) . . m ^gpl("error")=filter "RTN","SAMICAS2",298,0) . . s zerr=$g(filter("errorMessage")) "RTN","SAMICAS2",299,0) . . ;i err="" q ; "RTN","SAMICAS2",300,0) . . s ^gpl("error","zerr")=zerr "RTN","SAMICAS2",301,0) . . do findReplace^%ts(.line,"@@ERROR_MESSAGE@@",zerr) "RTN","SAMICAS2",302,0) . . s ^gpl("error","newline")=line "RTN","SAMICAS2",303,0) . set cnt=cnt+1 "RTN","SAMICAS2",304,0) . set rtn(cnt)=line "RTN","SAMICAS2",305,0) . quit "RTN","SAMICAS2",306,0) ; "RTN","SAMICAS2",307,0) do ADDCRLF^VPRJRUT(.rtn) "RTN","SAMICAS2",308,0) set HTTPRSP("mime")="text/html" ; set mime type "RTN","SAMICAS2",309,0) ; "RTN","SAMICAS2",310,0) ; "RTN","SAMICAS2",311,0) ;@stanza 9 termination "RTN","SAMICAS2",312,0) ; "RTN","SAMICAS2",313,0) quit ; end of ppi WSCASE^SAMICAS2 "RTN","SAMICAS2",314,0) ; "RTN","SAMICAS2",315,0) ; "RTN","SAMICAS2",316,0) ; "RTN","SAMICAS2",317,0) ;@ppi-code $$NOTEHREF^SAMICASE "RTN","SAMICAS2",318,0) NOTEHREF ; html list of notes for form "RTN","SAMICAS2",319,0) ; "RTN","SAMICAS2",320,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMICAS2",321,0) ; "RTN","SAMICAS2",322,0) ;ven/gpl;ppi;function;clean;silent;sac;??? tests "RTN","SAMICAS2",323,0) ;@signature "RTN","SAMICAS2",324,0) ; $$NOTEHREF^SAMICASE(sid,form) "RTN","SAMICAS2",325,0) ;@branches-from "RTN","SAMICAS2",326,0) ; NOTEHREF^SAMICASE "RTN","SAMICAS2",327,0) ;@ppi-called-by "RTN","SAMICAS2",328,0) ; WSNFPOST^SAMICAS3 "RTN","SAMICAS2",329,0) ;@called-by none "RTN","SAMICAS2",330,0) ;@calls "RTN","SAMICAS2",331,0) ; NTLIST^SAMINOT1 "RTN","SAMICAS2",332,0) ;@input "RTN","SAMICAS2",333,0) ; sid = study id "RTN","SAMICAS2",334,0) ; form "RTN","SAMICAS2",335,0) ;@output = html list of notes "RTN","SAMICAS2",336,0) ;@examples [tbd] "RTN","SAMICAS2",337,0) ;@tests [tbd] "RTN","SAMICAS2",338,0) ; "RTN","SAMICAS2",339,0) ; "RTN","SAMICAS2",340,0) ;@stanza 2 get list of notes "RTN","SAMICAS2",341,0) ; "RTN","SAMICAS2",342,0) new notehref set notehref="" "RTN","SAMICAS2",343,0) new ntlist "RTN","SAMICAS2",344,0) if form["sifor" do NTLIST^SAMINOT1("ntlist",sid,form) "RTN","SAMICAS2",345,0) if form["fufor" do NTLIST^SAMINOT2("ntlist",sid,form) "RTN","SAMICAS2",346,0) if $order(ntlist(""))="" quit notehref "RTN","SAMICAS2",347,0) ; "RTN","SAMICAS2",348,0) set notehref="<table>" "RTN","SAMICAS2",349,0) new zi set zi=0 "RTN","SAMICAS2",350,0) for do quit:'zi "RTN","SAMICAS2",351,0) . set zi=$order(ntlist(zi)) "RTN","SAMICAS2",352,0) . quit:'zi "RTN","SAMICAS2",353,0) . ; "RTN","SAMICAS2",354,0) . set notehref=notehref_"<td><form method=POST action=""/vapals"">" "RTN","SAMICAS2",355,0) . set notehref=notehref_"<input type=hidden name=""nien"" value="""_$get(ntlist(zi,"nien"))_""">" "RTN","SAMICAS2",356,0) . set notehref=notehref_"<input type=hidden name=""samiroute"" value=""note"">" "RTN","SAMICAS2",357,0) . set notehref=notehref_"<input type=hidden name=""studyid"" value="_sid_">" "RTN","SAMICAS2",358,0) . set notehref=notehref_"<input type=hidden name=""form"" value="_form_">" "RTN","SAMICAS2",359,0) . set notehref=notehref_"<input value="""_$get(ntlist(zi,"name"))_""" class=""btn btn-link"" role=""link"" type=""submit""></form></td></tr>" "RTN","SAMICAS2",360,0) . quit "RTN","SAMICAS2",361,0) set notehref=notehref_"</table>" "RTN","SAMICAS2",362,0) ; "RTN","SAMICAS2",363,0) ; "RTN","SAMICAS2",364,0) ;@stanza 3 termination "RTN","SAMICAS2",365,0) ; "RTN","SAMICAS2",366,0) quit notehref ; end of ppi $$NOTEHREF^SAMICASE "RTN","SAMICAS2",367,0) ; "RTN","SAMICAS2",368,0) ; "RTN","SAMICAS2",369,0) ; "RTN","SAMICAS2",370,0) ;@ppi-code GETTMPL^SAMICASE "RTN","SAMICAS2",371,0) GETTMPL ; get html template "RTN","SAMICAS2",372,0) ; "RTN","SAMICAS2",373,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMICAS2",374,0) ; "RTN","SAMICAS2",375,0) ;ven/gpl;ppi;procedure;clean;silent;sac;??% tests "RTN","SAMICAS2",376,0) ;@signature "RTN","SAMICAS2",377,0) ; do GETTMPL^SAMICASE(return,form) "RTN","SAMICAS2",378,0) ;@branches-from "RTN","SAMICAS2",379,0) ; GETTMPL^SAMICASE "RTN","SAMICAS2",380,0) ;@ppi-called-by "RTN","SAMICAS2",381,0) ; WSCASE^SAMICAS2 "RTN","SAMICAS2",382,0) ; GETHOME^SAMIHOM4 "RTN","SAMICAS2",383,0) ; WSNOTE^SAMINOT1 "RTN","SAMICAS2",384,0) ; WSNOTE^SAMINOT2 "RTN","SAMICAS2",385,0) ; WSNOTE^SAMINOT3 "RTN","SAMICAS2",386,0) ; WSNOTE^SAMINOTI "RTN","SAMICAS2",387,0) ;@called-by none "RTN","SAMICAS2",388,0) ;@calls "RTN","SAMICAS2",389,0) ; $$getTemplate^%wf "RTN","SAMICAS2",390,0) ; getThis^%wd "RTN","SAMICAS2",391,0) ;@input "RTN","SAMICAS2",392,0) ; return = name of array to return template "RTN","SAMICAS2",393,0) ; form = name of form "RTN","SAMICAS2",394,0) ;@output "RTN","SAMICAS2",395,0) ; @return = template "RTN","SAMICAS2",396,0) ;@examples [tbd] "RTN","SAMICAS2",397,0) ;@tests "RTN","SAMICAS2",398,0) ; UTGTMPL^SAMIUTS2 "RTN","SAMICAS2",399,0) ; "RTN","SAMICAS2",400,0) ; "RTN","SAMICAS2",401,0) ;@stanza 2 get html template "RTN","SAMICAS2",402,0) ; "RTN","SAMICAS2",403,0) quit:$get(form)="" "RTN","SAMICAS2",404,0) ; "RTN","SAMICAS2",405,0) new fn set fn=$$getTemplate^%wf(form) "RTN","SAMICAS2",406,0) do getThis^%wd(return,fn) "RTN","SAMICAS2",407,0) ; "RTN","SAMICAS2",408,0) set HTTPRSP("mime")="text/html" "RTN","SAMICAS2",409,0) ; "RTN","SAMICAS2",410,0) ; "RTN","SAMICAS2",411,0) ;@stanza 3 termination "RTN","SAMICAS2",412,0) ; "RTN","SAMICAS2",413,0) quit ; end of ppi GETTMPL^SAMICASE "RTN","SAMICAS2",414,0) ; "RTN","SAMICAS2",415,0) ; "RTN","SAMICAS2",416,0) ; "RTN","SAMICAS2",417,0) CNTITEMS(sid) ; extrinsic returns how many forms the patient has "RTN","SAMICAS2",418,0) ; used before deleting a patient "RTN","SAMICAS2",419,0) ; "RTN","SAMICAS2",420,0) ;@called by : none "RTN","SAMICAS2",421,0) ;@calls : "RTN","SAMICAS2",422,0) ; $$setroot^%wd "RTN","SAMICAS2",423,0) ;@input ; "RTN","SAMICAS2",424,0) ; sid = patient's study ID (e.g. "XXX00001") "RTN","SAMICAS2",425,0) ;@output ; "RTN","SAMICAS2",426,0) ;@tests : "RTN","SAMICAS2",427,0) ; SAMIUTS2 "RTN","SAMICAS2",428,0) new groot set groot=$$setroot^%wd("vapals-patients") "RTN","SAMICAS2",429,0) quit:'$data(@groot@("graph",sid)) 0 ; nothing there "RTN","SAMICAS2",430,0) new cnt,zi "RTN","SAMICAS2",431,0) set zi="" "RTN","SAMICAS2",432,0) set cnt=0 "RTN","SAMICAS2",433,0) for set zi=$o(@groot@("graph",sid,zi)) quit:zi="" do ; "RTN","SAMICAS2",434,0) . set cnt=cnt+1 "RTN","SAMICAS2",435,0) ; "RTN","SAMICAS2",436,0) quit cnt ; end of CNTITEMS "RTN","SAMICAS2",437,0) ; "RTN","SAMICAS2",438,0) ; "RTN","SAMICAS2",439,0) ; "RTN","SAMICAS2",440,0) ;@ppi-code GETITEMS^SAMICASE "RTN","SAMICAS2",441,0) GETITEMS ; get items available for studyid "RTN","SAMICAS2",442,0) ; "RTN","SAMICAS2",443,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMICAS2",444,0) ; "RTN","SAMICAS2",445,0) ;ven/gpl;ppi;procedure;clean;silent;sac;??% tests "RTN","SAMICAS2",446,0) ;@signature "RTN","SAMICAS2",447,0) ; do GETITEMS^SAMICASE(ary,sid) "RTN","SAMICAS2",448,0) ;@branches-from "RTN","SAMICAS2",449,0) ; GETITEMS^SAMICASE "RTN","SAMICAS2",450,0) ;@ppi-called-by "RTN","SAMICAS2",451,0) ; WSCASE^SAMICAS2 "RTN","SAMICAS2",452,0) ; $$BASELNDT^SAMICAS3 "RTN","SAMICAS2",453,0) ; MKCEFORM^SAMICAS3 "RTN","SAMICAS2",454,0) ; GETFILTR^SAMICTR0 "RTN","SAMICAS2",455,0) ; GETFILTR^SAMICTT0 "RTN","SAMICAS2",456,0) ; SELECT^SAMIUR "RTN","SAMICAS2",457,0) ; SELECT^SAMIUR1 "RTN","SAMICAS2",458,0) ; CUMPY^SAMIUR2 "RTN","SAMICAS2",459,0) ;@called-by none "RTN","SAMICAS2",460,0) ;@calls "RTN","SAMICAS2",461,0) ; $$setroot^%wd "RTN","SAMICAS2",462,0) ;@input "RTN","SAMICAS2",463,0) ; ary = name of return array "RTN","SAMICAS2",464,0) ; sid = patient's study ID (e.g. "XXX00001") "RTN","SAMICAS2",465,0) ;@output "RTN","SAMICAS2",466,0) ; @ary = returned items available "RTN","SAMICAS2",467,0) ;@examples [tbd] "RTN","SAMICAS2",468,0) ;@tests "RTN","SAMICAS2",469,0) ; UTCNTITM^SAMIUTS2 "RTN","SAMICAS2",470,0) ; "RTN","SAMICAS2",471,0) ; "RTN","SAMICAS2",472,0) ;@stanza 2 get items "RTN","SAMICAS2",473,0) ; "RTN","SAMICAS2",474,0) new groot set groot=$$setroot^%wd("vapals-patients") "RTN","SAMICAS2",475,0) quit:'$data(@groot@("graph",sid)) ; nothing there "RTN","SAMICAS2",476,0) ; "RTN","SAMICAS2",477,0) kill @ary "RTN","SAMICAS2",478,0) new zi set zi="" "RTN","SAMICAS2",479,0) for set zi=$order(@groot@("graph",sid,zi)) quit:zi="" do ; "RTN","SAMICAS2",480,0) . set @ary@(zi)="" "RTN","SAMICAS2",481,0) . quit "RTN","SAMICAS2",482,0) ; "RTN","SAMICAS2",483,0) ; "RTN","SAMICAS2",484,0) ;@stanza 3 get rest of forms (many-to-one, get dates) "RTN","SAMICAS2",485,0) ; "RTN","SAMICAS2",486,0) new tary "RTN","SAMICAS2",487,0) for set zi=$order(@ary@(zi)) quit:zi="" do ; "RTN","SAMICAS2",488,0) . new zkey1,zform set zkey1=$piece(zi,"-",1) "RTN","SAMICAS2",489,0) . ; if zkey1="sbform" quit ; "RTN","SAMICAS2",490,0) . if zkey1="siform" quit ; "RTN","SAMICAS2",491,0) . new fname "RTN","SAMICAS2",492,0) . if zkey1="ceform" set fname="CT Evaluation" "RTN","SAMICAS2",493,0) . set zform=zkey1 "RTN","SAMICAS2",494,0) . if zkey1="sbform" set zform="vapals:sbform" "RTN","SAMICAS2",495,0) . if zkey1="sbform" set fname="Background" "RTN","SAMICAS2",496,0) . if zkey1="ceform" set zform="vapals:ceform" "RTN","SAMICAS2",497,0) . if zkey1="fuform" set zform="vapals:fuform" "RTN","SAMICAS2",498,0) . if zkey1="fuform" set fname="Follow-up" "RTN","SAMICAS2",499,0) . if zkey1="bxform" set fname="Biopsy" "RTN","SAMICAS2",500,0) . if zkey1="bxform" set zform="vapals:bxform" "RTN","SAMICAS2",501,0) . if zkey1="ptform" set zform="vapals:ptform" "RTN","SAMICAS2",502,0) . if zkey1="ptform" set fname="PET Evaluation" "RTN","SAMICAS2",503,0) . if zkey1="itform" set zform="vapals:itform" "RTN","SAMICAS2",504,0) . if zkey1="itform" set fname="Intervention" "RTN","SAMICAS2",505,0) . if $get(fname)="" set fname="unknown" "RTN","SAMICAS2",506,0) . ; "RTN","SAMICAS2",507,0) . new zdate set zdate=$extract(zi,$length(zkey1)+2,$length(zi)) "RTN","SAMICAS2",508,0) . quit:$get(zdate)="" "RTN","SAMICAS2",509,0) . quit:$get(zform)="" "RTN","SAMICAS2",510,0) . quit:$get(zi)="" "RTN","SAMICAS2",511,0) . quit:$get(fname)="" "RTN","SAMICAS2",512,0) . ; "RTN","SAMICAS2",513,0) . set tary("sort",zdate,zform,zi,fname)="" "RTN","SAMICAS2",514,0) . set tary("type",zform,zi,fname)="" "RTN","SAMICAS2",515,0) . quit "RTN","SAMICAS2",516,0) merge @ary=tary "RTN","SAMICAS2",517,0) ; "RTN","SAMICAS2",518,0) ; "RTN","SAMICAS2",519,0) ;@stanza 4 termination "RTN","SAMICAS2",520,0) ; "RTN","SAMICAS2",521,0) quit ; end of ppi GETITEMS^SAMICASE "RTN","SAMICAS2",522,0) ; "RTN","SAMICAS2",523,0) ; "RTN","SAMICAS2",524,0) ; "RTN","SAMICAS2",525,0) GETDTKEY(formid) ; date portion of form key "RTN","SAMICAS2",526,0) ; "RTN","SAMICAS2",527,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMICAS2",528,0) ; "RTN","SAMICAS2",529,0) ;ven/gpl;private;function; "RTN","SAMICAS2",530,0) ;@called by "RTN","SAMICAS2",531,0) ; WSCASE^SAMICAS2 "RTN","SAMICAS2",532,0) ;@calls : "RTN","SAMICAS2",533,0) ;@input "RTN","SAMICAS2",534,0) ; formid form key "RTN","SAMICAS2",535,0) ;@output "RTN","SAMICAS2",536,0) ; date from form key "RTN","SAMICAS2",537,0) ;@examples "RTN","SAMICAS2",538,0) ; $$GETDTKEY("sbform-2018-02-26") = "2018-02-26" "RTN","SAMICAS2",539,0) ;@tests : "RTN","SAMICAS2",540,0) ; SAMIUTS2 "RTN","SAMICAS2",541,0) ; "RTN","SAMICAS2",542,0) ;@stanza 2 calculate date from key "RTN","SAMICAS2",543,0) ; "RTN","SAMICAS2",544,0) new frm set frm=$piece(formid,"-") "RTN","SAMICAS2",545,0) new date set date=$piece(formid,frm_"-",2) "RTN","SAMICAS2",546,0) ; "RTN","SAMICAS2",547,0) ;@stanza 3 return & termination "RTN","SAMICAS2",548,0) ; "RTN","SAMICAS2",549,0) quit date ; return date; end of $$GETDTKEY "RTN","SAMICAS2",550,0) ; "RTN","SAMICAS2",551,0) ; "RTN","SAMICAS2",552,0) ; "RTN","SAMICAS2",553,0) KEY2DSPD(zkey) ; date in elcap format from key date "RTN","SAMICAS2",554,0) ; "RTN","SAMICAS2",555,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMICAS2",556,0) ; "RTN","SAMICAS2",557,0) ;ven/gpl;private;function; "RTN","SAMICAS2",558,0) ;@called by "RTN","SAMICAS2",559,0) ; WSCASE^SAMICAS2 "RTN","SAMICAS2",560,0) ;@calls "RTN","SAMICAS2",561,0) ; ^%DT "RTN","SAMICAS2",562,0) ; $$FMTE^XLFDT "RTN","SAMICAS2",563,0) ; $$VAPALSDT^SAMICAS2 "RTN","SAMICAS2",564,0) ;@input "RTN","SAMICAS2",565,0) ; zkey = date in any format %DT can process "RTN","SAMICAS2",566,0) ;@output "RTN","SAMICAS2",567,0) ; date in elcap format "RTN","SAMICAS2",568,0) ;@examples "RTN","SAMICAS2",569,0) ; date 2018-02-26 => 26/Feb/2018 "RTN","SAMICAS2",570,0) ;@tests "RTN","SAMICAS2",571,0) ; SAMIUTS2 "RTN","SAMICAS2",572,0) ; "RTN","SAMICAS2",573,0) ;@stanza 2 convert date to elcap display format "RTN","SAMICAS2",574,0) ; "RTN","SAMICAS2",575,0) new X set X=zkey "RTN","SAMICAS2",576,0) new Y "RTN","SAMICAS2",577,0) do ^%DT "RTN","SAMICAS2",578,0) ;new Z set Z=$$FMTE^XLFDT(Y,"9D") "RTN","SAMICAS2",579,0) ;set Z=$translate(Z," ","/") "RTN","SAMICAS2",580,0) new zdate "RTN","SAMICAS2",581,0) set zdate=$$VAPALSDT^SAMICASE(Y) "RTN","SAMICAS2",582,0) ; "RTN","SAMICAS2",583,0) ;@stanza 3 return & termination "RTN","SAMICAS2",584,0) ; "RTN","SAMICAS2",585,0) quit zdate ; return date; end of $$KEY2DSPD "RTN","SAMICAS2",586,0) ; "RTN","SAMICAS2",587,0) ; "RTN","SAMICAS2",588,0) ; "RTN","SAMICAS2",589,0) ;@ppi-code $$VAPALSDT^SAMICASE "RTN","SAMICAS2",590,0) VAPALSDT ; vapals format for dates "RTN","SAMICAS2",591,0) ; "RTN","SAMICAS2",592,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMICAS2",593,0) ; "RTN","SAMICAS2",594,0) ;ven/gpl;ppi;function;clean;silent;sac;100% tests "RTN","SAMICAS2",595,0) ;@signature "RTN","SAMICAS2",596,0) ; $$VAPALSDT^SAMICASE(fmdate) "RTN","SAMICAS2",597,0) ;@branches-from "RTN","SAMICAS2",598,0) ; VAPALSDT^SAMICASE "RTN","SAMICAS2",599,0) ;@ppi-called-by "RTN","SAMICAS2",600,0) ; KEY2DSPD^SAMICAS2 "RTN","SAMICAS2",601,0) ; LASTCMP^SAMICAS3 "RTN","SAMICAS2",602,0) ; KEY2DT^SAMICAS3 "RTN","SAMICAS2",603,0) ; MKCEFORM^SAMICAS3 "RTN","SAMICAS2",604,0) ; MKFUFORM^SAMICAS3 "RTN","SAMICAS2",605,0) ; MKITFORM^SAMICAS3 "RTN","SAMICAS2",606,0) ; MKPTFORM^SAMICAS3 "RTN","SAMICAS2",607,0) ; LOGIT^SAMICLOG "RTN","SAMICAS2",608,0) ; MKSIFORM^SAMIHOM3 "RTN","SAMICAS2",609,0) ; PREFILL^SAMIHOM3 "RTN","SAMICAS2",610,0) ; SELECT^SAMIUR "RTN","SAMICAS2",611,0) ; SELECT^SAMIUR1 "RTN","SAMICAS2",612,0) ; IFORM^SAMIUR2 "RTN","SAMICAS2",613,0) ;@called-by none "RTN","SAMICAS2",614,0) ;@calls "RTN","SAMICAS2",615,0) ; $$FMTE^XLFDT "RTN","SAMICAS2",616,0) ;@input "RTN","SAMICAS2",617,0) ; fmdate = date in fileman format "RTN","SAMICAS2",618,0) ;@output = vapals date format "RTN","SAMICAS2",619,0) ;@tests "RTN","SAMICAS2",620,0) ; UTVPLSD^SAMIUTS2 "RTN","SAMICAS2",621,0) ; "RTN","SAMICAS2",622,0) ; "RTN","SAMICAS2",623,0) ;@stanza 2 convert date "RTN","SAMICAS2",624,0) ; "RTN","SAMICAS2",625,0) ; new vdate set vdate=$$FMTE^XLFDT(fmdate,"9D") "RTN","SAMICAS2",626,0) ; set vdate=$translate(vdate," ","/") "RTN","SAMICAS2",627,0) ; "RTN","SAMICAS2",628,0) new vdate set vdate=$$FMTE^XLFDT(fmdate,"5D") "RTN","SAMICAS2",629,0) ; "RTN","SAMICAS2",630,0) ; "RTN","SAMICAS2",631,0) ;@stanza 3 termination "RTN","SAMICAS2",632,0) ; "RTN","SAMICAS2",633,0) quit vdate ; end of ppi $$VAPALSDT^SAMICASE "RTN","SAMICAS2",634,0) ; "RTN","SAMICAS2",635,0) ; "RTN","SAMICAS2",636,0) ; "RTN","SAMICAS2",637,0) ;@section 2 WSNUFORM & related ppis "RTN","SAMICAS2",638,0) ; "RTN","SAMICAS2",639,0) ; "RTN","SAMICAS2",640,0) ; "RTN","SAMICAS2",641,0) ;@wri-code WSNUFORM^SAMICASE "RTN","SAMICAS2",642,0) WSNUFORM ; post vapals nuform: new form for patient "RTN","SAMICAS2",643,0) ; "RTN","SAMICAS2",644,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMICAS2",645,0) ; "RTN","SAMICAS2",646,0) ;ven/gpl;wri;procedure;clean;silent;sac;?? tests "RTN","SAMICAS2",647,0) ;@signature "RTN","SAMICAS2",648,0) ; do WSNUFORM^SAMICASE(rtn,filter) "RTN","SAMICAS2",649,0) ;@branches-from "RTN","SAMICAS2",650,0) ; WSNUFORM^SAMICASE "RTN","SAMICAS2",651,0) ;@wri-called-by "RTN","SAMICAS2",652,0) ; WSVAPALS^SAMIHOM3 [wr nuform of ws post vapals] "RTN","SAMICAS2",653,0) ;@called-by none "RTN","SAMICAS2",654,0) ;@calls "RTN","SAMICAS2",655,0) ; $$SID2NUM^SAMIHOM3 "RTN","SAMICAS2",656,0) ; $$setroot^%wd "RTN","SAMICAS2",657,0) ; GETTMPL^SAMICAS2 "RTN","SAMICAS2",658,0) ; findReplace^%ts "RTN","SAMICAS2",659,0) ; FIXHREF^SAMIFORM "RTN","SAMICAS2",660,0) ; FIXSRC^SAMIFORM "RTN","SAMICAS2",661,0) ; findReplace^%ts "RTN","SAMICAS2",662,0) ;@input "RTN","SAMICAS2",663,0) ; .filter = "RTN","SAMICAS2",664,0) ; .filter("studyid")=studyid of the patient "RTN","SAMICAS2",665,0) ;@output "RTN","SAMICAS2",666,0) ; @rtn "RTN","SAMICAS2",667,0) ;@tests "RTN","SAMICAS2",668,0) ; UTWSNF^SAMIUTS2 "RTN","SAMICAS2",669,0) ; "RTN","SAMICAS2",670,0) ; "RTN","SAMICAS2",671,0) ;@stanza 2 get select-new-form form "RTN","SAMICAS2",672,0) ; "RTN","SAMICAS2",673,0) new sid set sid=$get(filter("studyid")) "RTN","SAMICAS2",674,0) quit:sid="" "RTN","SAMICAS2",675,0) new sien set sien=$$SID2NUM^SAMIHOM3(sid) "RTN","SAMICAS2",676,0) quit:+sien=0 "RTN","SAMICAS2",677,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMICAS2",678,0) new groot set groot=$name(@root@(sien)) "RTN","SAMICAS2",679,0) ; "RTN","SAMICAS2",680,0) new saminame set saminame=$get(@groot@("saminame")) "RTN","SAMICAS2",681,0) quit:saminame="" "RTN","SAMICAS2",682,0) ; "RTN","SAMICAS2",683,0) new temp,tout,form "RTN","SAMICAS2",684,0) set return="temp",form="vapals:nuform" "RTN","SAMICAS2",685,0) do GETTMPL "RTN","SAMICAS2",686,0) quit:'$data(temp) "RTN","SAMICAS2",687,0) ; "RTN","SAMICAS2",688,0) new cnt set cnt=0 "RTN","SAMICAS2",689,0) new zi set zi=0 "RTN","SAMICAS2",690,0) for set zi=$order(temp(zi)) quit:+zi=0 do ; "RTN","SAMICAS2",691,0) . new ln set ln=temp(zi) "RTN","SAMICAS2",692,0) . new touched set touched=0 "RTN","SAMICAS2",693,0) . ; "RTN","SAMICAS2",694,0) . if ln["href" if 'touched do ; "RTN","SAMICAS2",695,0) . . do FIXHREF^SAMIFORM(.ln) "RTN","SAMICAS2",696,0) . . set temp(zi)=ln "RTN","SAMICAS2",697,0) . ; "RTN","SAMICAS2",698,0) . if ln["src" d ; "RTN","SAMICAS2",699,0) . . do FIXSRC^SAMIFORM(.ln) "RTN","SAMICAS2",700,0) . . set temp(zi)=ln "RTN","SAMICAS2",701,0) . ; "RTN","SAMICAS2",702,0) . if ln["@@SID@@" do ; "RTN","SAMICAS2",703,0) . . do findReplace^%ts(.ln,"@@SID@@",sid) "RTN","SAMICAS2",704,0) . . set temp(zi)=ln "RTN","SAMICAS2",705,0) . . quit "RTN","SAMICAS2",706,0) . ; "RTN","SAMICAS2",707,0) . if ln["@@SITE@@" do ; insert site id "RTN","SAMICAS2",708,0) . . n siteid s siteid=$g(filter("siteid")) "RTN","SAMICAS2",709,0) . . i siteid="" s siteid=$g(filter("site")) "RTN","SAMICAS2",710,0) . . q:siteid="" "RTN","SAMICAS2",711,0) . . do findReplace^%ts(.ln,"@@SITE@@",siteid) "RTN","SAMICAS2",712,0) . . s temp(zi)=ln "RTN","SAMICAS2",713,0) . ; "RTN","SAMICAS2",714,0) . if ln["@@SITETITLE@@" do ; insert site title "RTN","SAMICAS2",715,0) . . n sitetit s sitetit=$g(filter("sitetitle")) "RTN","SAMICAS2",716,0) . . if sitetit="" d ; "RTN","SAMICAS2",717,0) . . . n tsite s tsite=$g(filter("site")) "RTN","SAMICAS2",718,0) . . . q:tsite="" "RTN","SAMICAS2",719,0) . . . s sitetit=$$SITENM2^SAMISITE(tsite)_" - "_tsite "RTN","SAMICAS2",720,0) . . q:sitetit="" "RTN","SAMICAS2",721,0) . . do findReplace^%ts(.ln,"@@SITETITLE@@",sitetit) "RTN","SAMICAS2",722,0) . . s temp(zi)=ln "RTN","SAMICAS2",723,0) . ; "RTN","SAMICAS2",724,0) . set cnt=cnt+1 "RTN","SAMICAS2",725,0) . set rtn(cnt)=temp(zi) "RTN","SAMICAS2",726,0) ; "RTN","SAMICAS2",727,0) ; "RTN","SAMICAS2",728,0) ;@stanza 3 termination "RTN","SAMICAS2",729,0) ; "RTN","SAMICAS2",730,0) quit ; end of wri WSNUFORM^SAMICASE "RTN","SAMICAS2",731,0) ; "RTN","SAMICAS2",732,0) ; "RTN","SAMICAS2",733,0) ; "RTN","SAMICAS2",734,0) ;@ppi-code $$KEY2FM^SAMICASE "RTN","SAMICAS2",735,0) KEY2FM ; convert key to fileman date "RTN","SAMICAS2",736,0) ; "RTN","SAMICAS2",737,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMICAS2",738,0) ; "RTN","SAMICAS2",739,0) ;ven/gpl;wri;procedure;silent;clean;sac;??% tests "RTN","SAMICAS2",740,0) ;@signature "RTN","SAMICAS2",741,0) ; $$KEY2FM^SAMICASE(key) "RTN","SAMICAS2",742,0) ;@branches-from "RTN","SAMICAS2",743,0) ; KEY2FM^SAMICASE "RTN","SAMICAS2",744,0) ;@ppi-called-by "RTN","SAMICAS2",745,0) ; WSNFPOST^SAMICAS3 "RTN","SAMICAS2",746,0) ; $$LASTCMP^SAMICAS3 "RTN","SAMICAS2",747,0) ; $$KEY2DT^SAMICAS3 "RTN","SAMICAS2",748,0) ; SAVFILTR^SAMISAV "RTN","SAMICAS2",749,0) ; SELECT^SAMIUR "RTN","SAMICAS2",750,0) ; SELECT^SAMIUR1 "RTN","SAMICAS2",751,0) ; IFORM^SAMIUM2 "RTN","SAMICAS2",752,0) ;@called-by none "RTN","SAMICAS2",753,0) ;@calls "RTN","SAMICAS2",754,0) ; ^%DT "RTN","SAMICAS2",755,0) ;@input "RTN","SAMICAS2",756,0) ; key = vapals key (e.g. "RTN","SAMICAS2",757,0) ;@output "RTN","SAMICAS2",758,0) ;@examples "RTN","SAMICAS2",759,0) ; $$KEY2FM("sbform-2018-02-26") = 3180226 "RTN","SAMICAS2",760,0) ;@tests "RTN","SAMICAS2",761,0) ; UTK2FM^SAMIUTS2 "RTN","SAMICAS2",762,0) ; "RTN","SAMICAS2",763,0) ; "RTN","SAMICAS2",764,0) ;@stanza 2 convert key to fm date "RTN","SAMICAS2",765,0) ; "RTN","SAMICAS2",766,0) new datepart set datepart=key "RTN","SAMICAS2",767,0) ; allow key to be the whole key ie ceform-2018-10-3 "RTN","SAMICAS2",768,0) if $length(key,"-")=4 do "RTN","SAMICAS2",769,0) . new frm set frm=$piece(key,"-") "RTN","SAMICAS2",770,0) . set datepart=$piece(key,frm_"-",2) "RTN","SAMICAS2",771,0) . quit "RTN","SAMICAS2",772,0) new X set X=datepart "RTN","SAMICAS2",773,0) new Y "RTN","SAMICAS2",774,0) do ^%DT ; call fileman to convert date "RTN","SAMICAS2",775,0) ; "RTN","SAMICAS2",776,0) ; "RTN","SAMICAS2",777,0) ;@stanza 3 termination "RTN","SAMICAS2",778,0) ; "RTN","SAMICAS2",779,0) quit Y ; end of ppi $$KEY2FM^SAMICASE "RTN","SAMICAS2",780,0) ; "RTN","SAMICAS2",781,0) ; "RTN","SAMICAS2",782,0) ; "RTN","SAMICAS2",783,0) ;@section 3 casetbl "RTN","SAMICAS2",784,0) ; "RTN","SAMICAS2",785,0) ; "RTN","SAMICAS2",786,0) ; "RTN","SAMICAS2",787,0) ;@ppi $$GSAMISTA^SAMICAS2 = value of 'samistatus' from form "RTN","SAMICAS2",788,0) GSAMISTA(sid,form) ; extrinsic returns value of 'samistatus' from form "RTN","SAMICAS2",789,0) ; "RTN","SAMICAS2",790,0) ;@called by "RTN","SAMICAS2",791,0) ; WSCASE^SAMICAS2 "RTN","SAMICAS2",792,0) ;@calls "RTN","SAMICAS2",793,0) ; $$setroot^%wd "RTN","SAMICAS2",794,0) ;@input "RTN","SAMICAS2",795,0) ; sid = patient's studyid "RTN","SAMICAS2",796,0) ; form = specific study form (e.g. "sbform-2018-02-26") "RTN","SAMICAS2",797,0) ;@output "RTN","SAMICAS2",798,0) ; status of the form "RTN","SAMICAS2",799,0) ;@tests "RTN","SAMICAS2",800,0) ; SAMIUTS2 "RTN","SAMICAS2",801,0) ; "RTN","SAMICAS2",802,0) new stat,root,useform "RTN","SAMICAS2",803,0) set root=$$setroot^%wd("vapals-patients") "RTN","SAMICAS2",804,0) set useform=form "RTN","SAMICAS2",805,0) if form["vapals:" set useform=$p(form,"vapals:",2) "RTN","SAMICAS2",806,0) set stat=$get(@root@("graph",sid,useform,"samistatus")) "RTN","SAMICAS2",807,0) ; "RTN","SAMICAS2",808,0) quit stat ; end of ppi $$GSAMISTA^SAMICAS2 "RTN","SAMICAS2",809,0) ; "RTN","SAMICAS2",810,0) ; "RTN","SAMICAS2",811,0) ; "RTN","SAMICAS2",812,0) ;@ppi-code SSAMISTA^SAMICASE "RTN","SAMICAS2",813,0) SSAMISTA ; set samistatus to val in form "RTN","SAMICAS2",814,0) ; "RTN","SAMICAS2",815,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMICAS2",816,0) ; "RTN","SAMICAS2",817,0) ;ven/gpl;ppi;procedure;silent;clean;sac;??% tests "RTN","SAMICAS2",818,0) ;@signature "RTN","SAMICAS2",819,0) ; do SSAMISTA^SAMICASE(sid,form,val) "RTN","SAMICAS2",820,0) ;@branches-from "RTN","SAMICAS2",821,0) ; SSAMISTA^SAMICASE "RTN","SAMICAS2",822,0) ;@ppi-called-by "RTN","SAMICAS2",823,0) ; INITSTAT^SAMICAS2 "RTN","SAMICAS2",824,0) ; MKSBFORM^SAMICAS3 "RTN","SAMICAS2",825,0) ; MKCEFORM^SAMICAS3 "RTN","SAMICAS2",826,0) ; MKFUFORM^SAMICAS3 "RTN","SAMICAS2",827,0) ; MKPTFORM^SAMICAS3 "RTN","SAMICAS2",828,0) ; MKITFORM^SAMICAS3 "RTN","SAMICAS2",829,0) ; MKBXFORM^SAMICAS3 "RTN","SAMICAS2",830,0) ; MKSBFORM^SAMIHOM3 "RTN","SAMICAS2",831,0) ; MKSIFORM^SAMIHOM3 "RTN","SAMICAS2",832,0) ;@called-by none "RTN","SAMICAS2",833,0) ;@calls "RTN","SAMICAS2",834,0) ; $$setroot^%wd "RTN","SAMICAS2",835,0) ;@input "RTN","SAMICAS2",836,0) ; sid = patient's studyid "RTN","SAMICAS2",837,0) ; form = specific study form (e.g. "sbform-2018-02-26") "RTN","SAMICAS2",838,0) ; value = status (complete, incomplete) "RTN","SAMICAS2",839,0) ;@output "RTN","SAMICAS2",840,0) ; sets 'samistatus' to val in form "RTN","SAMICAS2",841,0) ;@examples [tbd] "RTN","SAMICAS2",842,0) ;@tests "RTN","SAMICAS2",843,0) ; UTSSAMIS^SAMIUTS2 "RTN","SAMICAS2",844,0) ; "RTN","SAMICAS2",845,0) ; "RTN","SAMICAS2",846,0) ;@stanza 2 set status "RTN","SAMICAS2",847,0) ; "RTN","SAMICAS2",848,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMICAS2",849,0) new useform set useform=form "RTN","SAMICAS2",850,0) if form["vapals:" set useform=$piece(form,"vapals:",2) "RTN","SAMICAS2",851,0) if '$data(@root@("graph",sid,useform)) quit ; no form "RTN","SAMICAS2",852,0) set @root@("graph",sid,useform,"samistatus")=val "RTN","SAMICAS2",853,0) ; "RTN","SAMICAS2",854,0) ; "RTN","SAMICAS2",855,0) ;@stanza 3 termination "RTN","SAMICAS2",856,0) ; "RTN","SAMICAS2",857,0) quit ; end of ppi SSAMISTA^SAMICASE "RTN","SAMICAS2",858,0) ; "RTN","SAMICAS2",859,0) ; "RTN","SAMICAS2",860,0) ; "RTN","SAMICAS2",861,0) ;@wri-code DELFORM^SAMICASE "RTN","SAMICAS2",862,0) DELFORM ; post vapals deleteform: delete incomplete form "RTN","SAMICAS2",863,0) ; "RTN","SAMICAS2",864,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMICAS2",865,0) ; "RTN","SAMICAS2",866,0) ;ven/gpl;wri;procedure;silent;clean;sac;??% tests "RTN","SAMICAS2",867,0) ;@signature "RTN","SAMICAS2",868,0) ; do DELFORM^SAMICASE(RESULT,ARGS) "RTN","SAMICAS2",869,0) ;@branches-from "RTN","SAMICAS2",870,0) ; DELFORM^SAMICASE "RTN","SAMICAS2",871,0) ;@wri-called-by "RTN","SAMICAS2",872,0) ; WSVAPALS^SAMIHOM3 [wr deleteform of ws post vapals] "RTN","SAMICAS2",873,0) ;@called-by none "RTN","SAMICAS2",874,0) ;@calls "RTN","SAMICAS2",875,0) ; $$setroot^%wd "RTN","SAMICAS2",876,0) ; $$GSAMISTA "RTN","SAMICAS2",877,0) ; WSCASE^SAMICASE "RTN","SAMICAS2",878,0) ;@input "RTN","SAMICAS2",879,0) ; .ARGS= "RTN","SAMICAS2",880,0) ; .ARGS("studyid") "RTN","SAMICAS2",881,0) ; .ARGS("form") "RTN","SAMICAS2",882,0) ;@output "RTN","SAMICAS2",883,0) ; @RESULT "RTN","SAMICAS2",884,0) ;@tests "RTN","SAMICAS2",885,0) ; UTDELFM^SAMIUTS2 "RTN","SAMICAS2",886,0) ; "RTN","SAMICAS2",887,0) ; will not delete intake or background form "RTN","SAMICAS2",888,0) ; "RTN","SAMICAS2",889,0) ; "RTN","SAMICAS2",890,0) ;@stanza 2 delete form "RTN","SAMICAS2",891,0) ; "RTN","SAMICAS2",892,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMICAS2",893,0) new sid set sid=$get(ARGS("studyid")) "RTN","SAMICAS2",894,0) quit:sid="" "RTN","SAMICAS2",895,0) ; "RTN","SAMICAS2",896,0) new form set form=$get(ARGS("form")) "RTN","SAMICAS2",897,0) quit:form="" "RTN","SAMICAS2",898,0) ; "RTN","SAMICAS2",899,0) quit:form["siform" "RTN","SAMICAS2",900,0) ; "RTN","SAMICAS2",901,0) ; quit:'$data(@root@("graph",sid,form)) ; form does not exist "RTN","SAMICAS2",902,0) if $$GSAMISTA(sid,form)="incomplete" do "RTN","SAMICAS2",903,0) . kill @root@("graph",sid,form) "RTN","SAMICAS2",904,0) . quit "RTN","SAMICAS2",905,0) ; "RTN","SAMICAS2",906,0) kill ARGS("samiroute") "RTN","SAMICAS2",907,0) do WSCASE^SAMICASE(.RESULT,.ARGS) ; post vapals casereview: "RTN","SAMICAS2",908,0) ; generate case review page "RTN","SAMICAS2",909,0) ; "RTN","SAMICAS2",910,0) ; "RTN","SAMICAS2",911,0) ;@stanza 3 termination "RTN","SAMICAS2",912,0) ; "RTN","SAMICAS2",913,0) quit ; end of wri DELFORM^SAMICASE "RTN","SAMICAS2",914,0) ; "RTN","SAMICAS2",915,0) ; "RTN","SAMICAS2",916,0) ; "RTN","SAMICAS2",917,0) INITSTAT ; set all forms to 'incomplete' "RTN","SAMICAS2",918,0) ; "RTN","SAMICAS2",919,0) ;@called by : none "RTN","SAMICAS2",920,0) ;@calls "RTN","SAMICAS2",921,0) ; SSAMISTA^SAMICASE "RTN","SAMICAS2",922,0) ;@input : none "RTN","SAMICAS2",923,0) ;@output "RTN","SAMICAS2",924,0) ; set all forms to 'incomplete' "RTN","SAMICAS2",925,0) ;@tests "RTN","SAMICAS2",926,0) ; "RTN","SAMICAS2",927,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMICAS2",928,0) new zi,zj set (zi,zj)="" "RTN","SAMICAS2",929,0) for set zi=$order(@root@("graph",zi)) quit:zi="" do ; "RTN","SAMICAS2",930,0) . for set zj=$order(@root@("graph",zi,zj)) quit:zj="" do ; "RTN","SAMICAS2",931,0) . . if zj["siform" do SSAMISTA^SAMICASE(zi,zj,"complete") quit ; "RTN","SAMICAS2",932,0) . . do SSAMISTA^SAMICASE(zi,zj,"incomplete") "RTN","SAMICAS2",933,0) ; "RTN","SAMICAS2",934,0) quit ; end of INITSTAT "RTN","SAMICAS2",935,0) ; "RTN","SAMICAS2",936,0) ; "RTN","SAMICAS2",937,0) ; "RTN","SAMICAS2",938,0) EOR ; end of routine SAMICAS2 "RTN","SAMICAS3") 0^2^B495988167 "RTN","SAMICAS3",1,0) SAMICAS3 ;ven/gpl - case review cont ;2021-07-01t15:42z "RTN","SAMICAS3",2,0) ;;18.0;SAMI;**3,9,11,12**;2020-01;Build 6 "RTN","SAMICAS3",3,0) ;;1.18.0.12-t3+i12 "RTN","SAMICAS3",4,0) ; "RTN","SAMICAS3",5,0) ; SAMICAS3 contains ppis and other subroutines to support processing "RTN","SAMICAS3",6,0) ; of the VAPALS-IELCAP case review page. "RTN","SAMICAS3",7,0) ; "RTN","SAMICAS3",8,0) quit ; no entry from top "RTN","SAMICAS3",9,0) ; "RTN","SAMICAS3",10,0) ; "RTN","SAMICAS3",11,0) ; "RTN","SAMICAS3",12,0) ;@section 0 primary development: see routine %wful "RTN","SAMICAS3",13,0) ; "RTN","SAMICAS3",14,0) ; "RTN","SAMICAS3",15,0) ; "RTN","SAMICAS3",16,0) ;@license see routine SAMIUL "RTN","SAMICAS3",17,0) ;@documentation see SAMICUL "RTN","SAMICAS3",18,0) ;@contents "RTN","SAMICAS3",19,0) ; WSNFPOST wri-code WSNFPOST^SAMICAS3, post vapals addform: new form "RTN","SAMICAS3",20,0) ; MKSBFORM create background form "RTN","SAMICAS3",21,0) ; "RTN","SAMICAS3",22,0) ; $$PREVNOD key of latest form including nodule grid "RTN","SAMICAS3",23,0) ; $$LASTCMP date & key of last comparison scan "RTN","SAMICAS3",24,0) ; $$PRIORCMP dates of all scans before last comparison scan "RTN","SAMICAS3",25,0) ; $$KEY2DT date to put in prior scans field "RTN","SAMICAS3",26,0) ; SORTFRMS sorts all forms for patient sid by date "RTN","SAMICAS3",27,0) ; "RTN","SAMICAS3",28,0) ; MKCEFORM create ct evaluation form "RTN","SAMICAS3",29,0) ; MKFUFORM create follow-up form "RTN","SAMICAS3",30,0) ; $$BASELNDT last previous baseline ct date "RTN","SAMICAS3",31,0) ; MKPTFORM create pet evaluation form "RTN","SAMICAS3",32,0) ; MKITFORM create intervention form "RTN","SAMICAS3",33,0) ; MKBXFORM create biopsy form "RTN","SAMICAS3",34,0) ; CASETBL generates case review table "RTN","SAMICAS3",35,0) ; "RTN","SAMICAS3",36,0) ; "RTN","SAMICAS3",37,0) ; "RTN","SAMICAS3",38,0) ;@section 1 WSNFPOST & related subroutines "RTN","SAMICAS3",39,0) ; "RTN","SAMICAS3",40,0) ; "RTN","SAMICAS3",41,0) ; "RTN","SAMICAS3",42,0) ;@wri-code WSNFPOST^SAMICAS3 "RTN","SAMICAS3",43,0) WSNFPOST ; post vapals addform: new form "RTN","SAMICAS3",44,0) ; "RTN","SAMICAS3",45,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMICAS3",46,0) ; "RTN","SAMICAS3",47,0) ;ven/gpl;wri;procedure;clean;silent;sac;??% tests "RTN","SAMICAS3",48,0) ;@signature "RTN","SAMICAS3",49,0) ; do WSNFPOST^SAMICASE(ARGS,BODY,RESULT) "RTN","SAMICAS3",50,0) ;@branches-from "RTN","SAMICAS3",51,0) ; WSNFPOST^SAMICASE "RTN","SAMICAS3",52,0) ;@ppi-called-by "RTN","SAMICAS3",53,0) ; WSVAPALS^SAMIHOME [wr addform of ws post vapals] "RTN","SAMICAS3",54,0) ;@called-by none "RTN","SAMICAS3",55,0) ;@calls "RTN","SAMICAS3",56,0) ; parseBody^%wf "RTN","SAMICAS3",57,0) ; GETHOME^SAMIHOM3 "RTN","SAMICAS3",58,0) ; $$KEYDATE^SAMIHOM3 "RTN","SAMICAS3",59,0) ; $$setroot^%wd "RTN","SAMICAS3",60,0) ; $$KEY2FM^SAMICAS2 "RTN","SAMICAS3",61,0) ; $$FMADD^XLFDT "RTN","SAMICAS3",62,0) ; WSCASE^SAMICASE "RTN","SAMICAS3",63,0) ; MKSBFORM^SAMICAS3 "RTN","SAMICAS3",64,0) ; MKCEFORM^SAMICAS3 "RTN","SAMICAS3",65,0) ; MKFUFORM^SAMICAS3 "RTN","SAMICAS3",66,0) ; MKBXFORM^SAMICAS3 "RTN","SAMICAS3",67,0) ; MKPTFORM^SAMICAS3 "RTN","SAMICAS3",68,0) ; MKITFORM^SAMICAS3 "RTN","SAMICAS3",69,0) ; wsGetForm^%wf "RTN","SAMICAS3",70,0) ;@input "RTN","SAMICAS3",71,0) ; .ARGS "RTN","SAMICAS3",72,0) ; .ARGS("form") "RTN","SAMICAS3",73,0) ; .ARGS("studyid") "RTN","SAMICAS3",74,0) ; .ARGS("sid") "RTN","SAMICAS3",75,0) ; .BODY "RTN","SAMICAS3",76,0) ; .BODY(1) (e.g. "samiroute=casereview&dfn="_dfn_"&studyid="_studyid) "RTN","SAMICAS3",77,0) ;@output "RTN","SAMICAS3",78,0) ; @RESULT "RTN","SAMICAS3",79,0) ;@tests "RTN","SAMICAS3",80,0) ; UTNFPST^SAMIUTS2 "RTN","SAMICAS3",81,0) ; "RTN","SAMICAS3",82,0) ; "RTN","SAMICAS3",83,0) ;@stanza 2 get new form "RTN","SAMICAS3",84,0) ; "RTN","SAMICAS3",85,0) new vars,bdy "RTN","SAMICAS3",86,0) set bdy=$get(BODY(1)) "RTN","SAMICAS3",87,0) do parseBody^%wf("vars",.bdy) "RTN","SAMICAS3",88,0) merge vars=ARGS "RTN","SAMICAS3",89,0) merge ^SAMIUL("nuform","vars")=vars "RTN","SAMICAS3",90,0) ; "RTN","SAMICAS3",91,0) new sid set sid=$get(vars("studyid")) "RTN","SAMICAS3",92,0) if sid="" set sid=$get(ARGS("sid")) "RTN","SAMICAS3",93,0) if sid="" do quit ; "RTN","SAMICAS3",94,0) . do GETHOME^SAMIHOM3(.RESULT,.ARGS) ; on error return to home page "RTN","SAMICAS3",95,0) . quit "RTN","SAMICAS3",96,0) ; "RTN","SAMICAS3",97,0) set nuform=$get(vars("form")) "RTN","SAMICAS3",98,0) if nuform="" set nuform="ceform" "RTN","SAMICAS3",99,0) ; "RTN","SAMICAS3",100,0) new datekey set datekey=$$KEYDATE^SAMIHOM3($$NOW^XLFDT) "RTN","SAMICAS3",101,0) ; "RTN","SAMICAS3",102,0) ; check to see if form already exists "RTN","SAMICAS3",103,0) ; "RTN","SAMICAS3",104,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMICAS3",105,0) new collide set collide=0 ; duplicate form for today - backdate forms scenario "RTN","SAMICAS3",106,0) if $data(@root@("graph",sid,nuform_"-"_datekey)) do ; already exists "RTN","SAMICAS3",107,0) . set collide=1 "RTN","SAMICAS3",108,0) . if nuform="siform" quit "RTN","SAMICAS3",109,0) . if nuform="sbform" quit ; do not create multiple background forms "RTN","SAMICAS3",110,0) . new lastone "RTN","SAMICAS3",111,0) . set lastone=$order(@root@("graph",sid,nuform_"-a "),-1) "RTN","SAMICAS3",112,0) . quit:lastone="" "RTN","SAMICAS3",113,0) . set newfm=$$KEY2FM^SAMICASE(lastone) "RTN","SAMICAS3",114,0) . set datekey=$$KEYDATE^SAMIHOM3($$FMADD^XLFDT(newfm,1)) ; add one day to the last form "RTN","SAMICAS3",115,0) . quit "RTN","SAMICAS3",116,0) ; "RTN","SAMICAS3",117,0) ; code to not allow two same forms for a patient a day "RTN","SAMICAS3",118,0) ; "RTN","SAMICAS3",119,0) if collide=1 do quit ; "RTN","SAMICAS3",120,0) . set ARGS("errorMessage")="Form already exists for today" "RTN","SAMICAS3",121,0) . set ARGS("studyid")=sid "RTN","SAMICAS3",122,0) . do WSCASE^SAMICASE(.RESULT,.ARGS) "RTN","SAMICAS3",123,0) . quit "RTN","SAMICAS3",124,0) ; "RTN","SAMICAS3",125,0) if nuform="sbform" do ; "RTN","SAMICAS3",126,0) . new oldkey set oldkey=$order(@root@("graph",sid,"sbform")) "RTN","SAMICAS3",127,0) . if $extract(oldkey,1,6)="sbform" do quit ; "RTN","SAMICAS3",128,0) . . set ARGS("key")=oldkey "RTN","SAMICAS3",129,0) . . set ARGS("studyid")=sid "RTN","SAMICAS3",130,0) . . set ARGS("form")="vapals:sbform" "RTN","SAMICAS3",131,0) . . quit "RTN","SAMICAS3",132,0) . new key set key="sbform-"_datekey "RTN","SAMICAS3",133,0) . set ARGS("key")=key "RTN","SAMICAS3",134,0) . set ARGS("studyid")=sid "RTN","SAMICAS3",135,0) . set ARGS("form")="vapals:sbform" "RTN","SAMICAS3",136,0) . do MKSBFORM(sid,key) "RTN","SAMICAS3",137,0) . quit "RTN","SAMICAS3",138,0) ; "RTN","SAMICAS3",139,0) if nuform="ceform" do ; "RTN","SAMICAS3",140,0) . new key set key="ceform-"_datekey "RTN","SAMICAS3",141,0) . set ARGS("key")=key "RTN","SAMICAS3",142,0) . set ARGS("studyid")=sid "RTN","SAMICAS3",143,0) . set ARGS("form")="vapals:ceform" "RTN","SAMICAS3",144,0) . do MKCEFORM(sid,key) "RTN","SAMICAS3",145,0) . quit "RTN","SAMICAS3",146,0) ; "RTN","SAMICAS3",147,0) if nuform="fuform" do ; "RTN","SAMICAS3",148,0) . new key set key="fuform-"_datekey "RTN","SAMICAS3",149,0) . set ARGS("key")=key "RTN","SAMICAS3",150,0) . set ARGS("studyid")=sid "RTN","SAMICAS3",151,0) . set ARGS("form")="vapals:fuform" "RTN","SAMICAS3",152,0) . do MKFUFORM(sid,key) "RTN","SAMICAS3",153,0) . quit "RTN","SAMICAS3",154,0) ; "RTN","SAMICAS3",155,0) if nuform="bxform" do ; "RTN","SAMICAS3",156,0) . new key set key="bxform-"_datekey "RTN","SAMICAS3",157,0) . set ARGS("key")=key "RTN","SAMICAS3",158,0) . set ARGS("studyid")=sid "RTN","SAMICAS3",159,0) . set ARGS("form")="vapals:bxform" "RTN","SAMICAS3",160,0) . do MKBXFORM(sid,key) "RTN","SAMICAS3",161,0) . quit "RTN","SAMICAS3",162,0) ; "RTN","SAMICAS3",163,0) if nuform="ptform" do ; "RTN","SAMICAS3",164,0) . new key set key="ptform-"_datekey "RTN","SAMICAS3",165,0) . set ARGS("key")=key "RTN","SAMICAS3",166,0) . set ARGS("studyid")=sid "RTN","SAMICAS3",167,0) . set ARGS("form")="vapals:ptform" "RTN","SAMICAS3",168,0) . do MKPTFORM(sid,key) "RTN","SAMICAS3",169,0) . quit "RTN","SAMICAS3",170,0) ; "RTN","SAMICAS3",171,0) if nuform="itform" do ; "RTN","SAMICAS3",172,0) . new key set key="itform-"_datekey "RTN","SAMICAS3",173,0) . set ARGS("key")=key "RTN","SAMICAS3",174,0) . set ARGS("studyid")=sid "RTN","SAMICAS3",175,0) . set ARGS("form")="vapals:itform" "RTN","SAMICAS3",176,0) . do MKITFORM(sid,key) "RTN","SAMICAS3",177,0) . quit "RTN","SAMICAS3",178,0) ; "RTN","SAMICAS3",179,0) do wsGetForm^%wf(.RESULT,.ARGS) "RTN","SAMICAS3",180,0) ; "RTN","SAMICAS3",181,0) ; "RTN","SAMICAS3",182,0) ;@stanza 3 termination "RTN","SAMICAS3",183,0) ; "RTN","SAMICAS3",184,0) quit ; end of wri WSNFPOST^SAMICASE "RTN","SAMICAS3",185,0) ; "RTN","SAMICAS3",186,0) ; "RTN","SAMICAS3",187,0) ; "RTN","SAMICAS3",188,0) MKSBFORM(sid,key) ; create background form "RTN","SAMICAS3",189,0) ; "RTN","SAMICAS3",190,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMICAS3",191,0) ; "RTN","SAMICAS3",192,0) ;ven/gpl;private;procedure; "RTN","SAMICAS3",193,0) ;@called-by "RTN","SAMICAS3",194,0) ; WSNFPOST^SAMICAS3 "RTN","SAMICAS3",195,0) ;@calls "RTN","SAMICAS3",196,0) ; $$setroot^%wd "RTN","SAMICAS3",197,0) ; $$SID2NUM^SAMIHOM3 "RTN","SAMICAS3",198,0) ; SSAMISTA^SAMICASE "RTN","SAMICAS3",199,0) ;@input "RTN","SAMICAS3",200,0) ; sid = study id "RTN","SAMICAS3",201,0) ; key = form key, e.g. sbform-2021-05-25 "RTN","SAMICAS3",202,0) ;@output "RTN","SAMICAS3",203,0) ; @root@("graph",sid,key) "RTN","SAMICAS3",204,0) ;@examples [tbd] "RTN","SAMICAS3",205,0) ;@tests [tbd] "RTN","SAMICAS3",206,0) ; "RTN","SAMICAS3",207,0) ;@stanza 2 create background form "RTN","SAMICAS3",208,0) ; "RTN","SAMICAS3",209,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMICAS3",210,0) new sien set sien=$$SID2NUM^SAMIHOM3(sid) "RTN","SAMICAS3",211,0) quit:+sien=0 "RTN","SAMICAS3",212,0) ; "RTN","SAMICAS3",213,0) new cdate set cdate=$piece(key,"sbform-",2) "RTN","SAMICAS3",214,0) merge @root@("graph",sid,key)=@root@(sien) "RTN","SAMICAS3",215,0) set @root@("graph",sid,key,"samicreatedate")=cdate "RTN","SAMICAS3",216,0) do SSAMISTA^SAMICASE(sid,key,"incomplete") "RTN","SAMICAS3",217,0) ; "RTN","SAMICAS3",218,0) ;@stanza 3 termination "RTN","SAMICAS3",219,0) ; "RTN","SAMICAS3",220,0) quit ; end of MKSBFORM "RTN","SAMICAS3",221,0) ; "RTN","SAMICAS3",222,0) ; "RTN","SAMICAS3",223,0) ; "RTN","SAMICAS3",224,0) PREVNOD(sid) ; key of latest form including nodule grid "RTN","SAMICAS3",225,0) ; "RTN","SAMICAS3",226,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMICAS3",227,0) ; "RTN","SAMICAS3",228,0) ;ven/gpl;private;function;clean;silent;sac; "RTN","SAMICAS3",229,0) ;@called-by none [commented out in MKCEFORM,MKPTFORM,MKBXFORM] "RTN","SAMICAS3",230,0) ;@calls "RTN","SAMICAS3",231,0) ; SORTFRMS "RTN","SAMICAS3",232,0) ;@input "RTN","SAMICAS3",233,0) ; sid = study id "RTN","SAMICAS3",234,0) ;@output = key of latest form incl nodule grid "RTN","SAMICAS3",235,0) ;@examples [tbd] "RTN","SAMICAS3",236,0) ;@tests [tbd] "RTN","SAMICAS3",237,0) ; "RTN","SAMICAS3",238,0) ; used for nodule copy "RTN","SAMICAS3",239,0) ; "RTN","SAMICAS3",240,0) ; "RTN","SAMICAS3",241,0) ;@stanza 2 calculate key of latest form incl nodule grid "RTN","SAMICAS3",242,0) ; "RTN","SAMICAS3",243,0) new retkey set retkey="" "RTN","SAMICAS3",244,0) new fary "RTN","SAMICAS3",245,0) do SORTFRMS(.fary,sid) "RTN","SAMICAS3",246,0) ; "RTN","SAMICAS3",247,0) new tdt set tdt="" "RTN","SAMICAS3",248,0) for set tdt=$order(fary(tdt),-1) quit:tdt="" quit:retkey'="" do ; "RTN","SAMICAS3",249,0) . new tmpkey set tmpkey="" "RTN","SAMICAS3",250,0) . for set tmpkey=$order(fary(tdt,tmpkey)) quit:tmpkey="" quit:retkey'="" do ; "RTN","SAMICAS3",251,0) . . if tmpkey["ceform" set retkey=tmpkey "RTN","SAMICAS3",252,0) . . if tmpkey["ptform" set retkey=tmpkey "RTN","SAMICAS3",253,0) . . if tmpkey["bxform" set retkey=tmpkey "RTN","SAMICAS3",254,0) . . quit "RTN","SAMICAS3",255,0) . quit "RTN","SAMICAS3",256,0) ; "RTN","SAMICAS3",257,0) ; "RTN","SAMICAS3",258,0) ;@stanza 3 termination "RTN","SAMICAS3",259,0) ; "RTN","SAMICAS3",260,0) quit retkey ; end of $$PREVNOD "RTN","SAMICAS3",261,0) ; "RTN","SAMICAS3",262,0) ; "RTN","SAMICAS3",263,0) ; "RTN","SAMICAS3",264,0) LASTCMP(sid,retkey) ; date & key of last comparison scan "RTN","SAMICAS3",265,0) ; "RTN","SAMICAS3",266,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMICAS3",267,0) ; "RTN","SAMICAS3",268,0) ;ven/gpl;private;function;clean;silent;sac; "RTN","SAMICAS3",269,0) ;@called-by "RTN","SAMICAS3",270,0) ; MKBXFORM "RTN","SAMICAS3",271,0) ; MKCEFORM "RTN","SAMICAS3",272,0) ; MKFUFORM "RTN","SAMICAS3",273,0) ; MKITFORM "RTN","SAMICAS3",274,0) ; MKPTFORM "RTN","SAMICAS3",275,0) ;@calls "RTN","SAMICAS3",276,0) ; SORTFRMS "RTN","SAMICAS3",277,0) ; $$NOW^XLFDT "RTN","SAMICAS3",278,0) ; $$KEY2FM^SAMICASE "RTN","SAMICAS3",279,0) ; $$VAPALSDT^SAMICASE "RTN","SAMICAS3",280,0) ;@input "RTN","SAMICAS3",281,0) ; sid = study id "RTN","SAMICAS3",282,0) ;@output = date of last comparison scan "RTN","SAMICAS3",283,0) ; .retkey = key of last comparison scan "RTN","SAMICAS3",284,0) ;@examples [tbd] "RTN","SAMICAS3",285,0) ;@tests [tbd] "RTN","SAMICAS3",286,0) ; "RTN","SAMICAS3",287,0) ; "RTN","SAMICAS3",288,0) ;@stanza 2 calculate date & key of last comparison scan "RTN","SAMICAS3",289,0) ; "RTN","SAMICAS3",290,0) set retkey="" "RTN","SAMICAS3",291,0) new fary "RTN","SAMICAS3",292,0) do SORTFRMS(.fary,sid) "RTN","SAMICAS3",293,0) ; "RTN","SAMICAS3",294,0) new tdt set tdt=$piece($$NOW^XLFDT,".",1)+1 ; start with today "RTN","SAMICAS3",295,0) ;new tdt set tdt=$piece($$NOW^XLFDT,".",1) ; start with before today "RTN","SAMICAS3",296,0) for set tdt=$order(fary(tdt),-1) quit:tdt="" quit:retkey'="" do ; "RTN","SAMICAS3",297,0) . new tmpkey set tmpkey="" "RTN","SAMICAS3",298,0) . for set tmpkey=$order(fary(tdt,tmpkey)) quit:tmpkey="" quit:retkey'="" do ; "RTN","SAMICAS3",299,0) . . if tmpkey["ceform" set retkey=tmpkey "RTN","SAMICAS3",300,0) . . quit "RTN","SAMICAS3",301,0) . quit "RTN","SAMICAS3",302,0) ; "RTN","SAMICAS3",303,0) new retdt set retdt=-1 "RTN","SAMICAS3",304,0) if retkey'="" do ; "RTN","SAMICAS3",305,0) . new fmdt set fmdt=$$KEY2FM^SAMICASE(retkey) "RTN","SAMICAS3",306,0) . set retdt=$$VAPALSDT^SAMICASE(fmdt) "RTN","SAMICAS3",307,0) . quit "RTN","SAMICAS3",308,0) ; "RTN","SAMICAS3",309,0) ; "RTN","SAMICAS3",310,0) ;@stanza 3 termination "RTN","SAMICAS3",311,0) ; "RTN","SAMICAS3",312,0) quit retdt ; end of $$LASTCMP "RTN","SAMICAS3",313,0) ; "RTN","SAMICAS3",314,0) ; "RTN","SAMICAS3",315,0) ; "RTN","SAMICAS3",316,0) PRIORCMP(sid) ; dates of all scans before last comparison scan "RTN","SAMICAS3",317,0) ; "RTN","SAMICAS3",318,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMICAS3",319,0) ; "RTN","SAMICAS3",320,0) ;ven/gpl;private;function;clean;silent;sac; "RTN","SAMICAS3",321,0) ;@called-by "RTN","SAMICAS3",322,0) ; MKCEFORM "RTN","SAMICAS3",323,0) ; MKPTFORM "RTN","SAMICAS3",324,0) ; MKITFORM "RTN","SAMICAS3",325,0) ;@calls "RTN","SAMICAS3",326,0) ; SORTFRMS "RTN","SAMICAS3",327,0) ; $$NOW^XLFDT "RTN","SAMICAS3",328,0) ; $$KEY2DT "RTN","SAMICAS3",329,0) ;@input "RTN","SAMICAS3",330,0) ; sid = study id "RTN","SAMICAS3",331,0) ;@output = dates of all scans before last comparison scan "RTN","SAMICAS3",332,0) ;@examples [tbd] "RTN","SAMICAS3",333,0) ;@tests [tbd] "RTN","SAMICAS3",334,0) ; "RTN","SAMICAS3",335,0) ; "RTN","SAMICAS3",336,0) ;@stanza 2 calculate dates of all scans before last comparison scan "RTN","SAMICAS3",337,0) ; "RTN","SAMICAS3",338,0) new retstr set retstr="" "RTN","SAMICAS3",339,0) new lastcmp set lastcmp="" "RTN","SAMICAS3",340,0) new fary "RTN","SAMICAS3",341,0) do SORTFRMS(.fary,sid) "RTN","SAMICAS3",342,0) ; "RTN","SAMICAS3",343,0) ; new tdt set tdt=$piece($$NOW^XLFDT,".",1)+1 ; start with today "RTN","SAMICAS3",344,0) new tdt set tdt=$piece($$NOW^XLFDT,".",1) ; start with before today "RTN","SAMICAS3",345,0) for set tdt=$order(fary(tdt),-1) quit:tdt="" do ; "RTN","SAMICAS3",346,0) . ; "RTN","SAMICAS3",347,0) . if lastcmp="" do ; first find the last comparison scan "RTN","SAMICAS3",348,0) . . new tmpkey set tmpkey="" "RTN","SAMICAS3",349,0) . . for set tmpkey=$order(fary(tdt,tmpkey)) quit:tmpkey="" quit:lastcmp'="" do ; "RTN","SAMICAS3",350,0) . . . if tmpkey["ceform" set lastcmp=tmpkey "RTN","SAMICAS3",351,0) . . . quit "RTN","SAMICAS3",352,0) . . quit "RTN","SAMICAS3",353,0) . ; "RTN","SAMICAS3",354,0) . do ; "RTN","SAMICAS3",355,0) . . ; next add all previous scans to retstr "RTN","SAMICAS3",356,0) . . new tmpkey2 set tmpkey2="" "RTN","SAMICAS3",357,0) . . for set tmpkey2=$order(fary(tdt,tmpkey2)) quit:tmpkey2="" do ; "RTN","SAMICAS3",358,0) . . . if tmpkey2["ceform" do ; convert to external date "RTN","SAMICAS3",359,0) . . . . set retstr=$$KEY2DT(tmpkey2)_retstr "RTN","SAMICAS3",360,0) . . . . quit "RTN","SAMICAS3",361,0) . . . quit "RTN","SAMICAS3",362,0) . . quit "RTN","SAMICAS3",363,0) . quit "RTN","SAMICAS3",364,0) ; "RTN","SAMICAS3",365,0) if $extract(retstr,$length(retstr))="," do "RTN","SAMICAS3",366,0) . set retstr=$extract(retstr,1,$length(retstr)-1) "RTN","SAMICAS3",367,0) . quit "RTN","SAMICAS3",368,0) ; "RTN","SAMICAS3",369,0) ; "RTN","SAMICAS3",370,0) ;@stanza 3 termination "RTN","SAMICAS3",371,0) ; "RTN","SAMICAS3",372,0) quit retstr ; end of $$PRIORCMP "RTN","SAMICAS3",373,0) ; "RTN","SAMICAS3",374,0) ; "RTN","SAMICAS3",375,0) ; "RTN","SAMICAS3",376,0) KEY2DT(key) ; date to put in prior scans field "RTN","SAMICAS3",377,0) ; "RTN","SAMICAS3",378,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMICAS3",379,0) ; "RTN","SAMICAS3",380,0) ;ven/gpl;private;function;clean;silent;sac; "RTN","SAMICAS3",381,0) ;@called-by "RTN","SAMICAS3",382,0) ; $$PRIORCMP "RTN","SAMICAS3",383,0) ;@calls "RTN","SAMICAS3",384,0) ; $$KEY2FM^SAMICASE "RTN","SAMICAS3",385,0) ; $$VAPALSDT^SAMICASE "RTN","SAMICAS3",386,0) ;@input "RTN","SAMICAS3",387,0) ; key = form key, e.g. ctform-2021-05-25 "RTN","SAMICAS3",388,0) ;@output = date to put in prior scans field "RTN","SAMICAS3",389,0) ;@examples [tbd] "RTN","SAMICAS3",390,0) ;@tests [tbd] "RTN","SAMICAS3",391,0) ; "RTN","SAMICAS3",392,0) ; "RTN","SAMICAS3",393,0) ;@stanza 2 calculate prior scans date "RTN","SAMICAS3",394,0) ; "RTN","SAMICAS3",395,0) new retstr2 set retstr2="" "RTN","SAMICAS3",396,0) new fmdt set fmdt=$$KEY2FM^SAMICASE(tmpkey2) "RTN","SAMICAS3",397,0) set retstr2=$$VAPALSDT^SAMICASE(fmdt)_","_retstr2 "RTN","SAMICAS3",398,0) ; "RTN","SAMICAS3",399,0) ; "RTN","SAMICAS3",400,0) ;@stanza 3 termination "RTN","SAMICAS3",401,0) ; "RTN","SAMICAS3",402,0) quit retstr2 ; end of $$KEY2DT "RTN","SAMICAS3",403,0) ; "RTN","SAMICAS3",404,0) ; "RTN","SAMICAS3",405,0) ; "RTN","SAMICAS3",406,0) SORTFRMS(ARY,sid) ; sorts all forms for patient sid by date "RTN","SAMICAS3",407,0) ; "RTN","SAMICAS3",408,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMICAS3",409,0) ; "RTN","SAMICAS3",410,0) ;ven/gpl;private;procedure;clean;silent;sac; "RTN","SAMICAS3",411,0) ;@called-by "RTN","SAMICAS3",412,0) ; $$PREVNOD "RTN","SAMICAS3",413,0) ; $$LASTCMP "RTN","SAMICAS3",414,0) ; $$PRIORCMP "RTN","SAMICAS3",415,0) ;@calls "RTN","SAMICAS3",416,0) ; $$setroot^%wd "RTN","SAMICAS3",417,0) ; ^%DT "RTN","SAMICAS3",418,0) ; ^%ZTER "RTN","SAMICAS3",419,0) ;@input "RTN","SAMICAS3",420,0) ; sid = study id "RTN","SAMICAS3",421,0) ;@output "RTN","SAMICAS3",422,0) ; .ARY: sorted array of all forms for patient by date "RTN","SAMICAS3",423,0) ; ARY(fmdate,key)="" "RTN","SAMICAS3",424,0) ;@examples [tbd] "RTN","SAMICAS3",425,0) ;@tests [tbd] "RTN","SAMICAS3",426,0) ; "RTN","SAMICAS3",427,0) ; "RTN","SAMICAS3",428,0) ;@stanza 2 sort patient's forms by date "RTN","SAMICAS3",429,0) ; "RTN","SAMICAS3",430,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMICAS3",431,0) quit:'$data(@root@("graph",sid)) "RTN","SAMICAS3",432,0) new froot set froot=$name(@root@("graph",sid)) "RTN","SAMICAS3",433,0) ; "RTN","SAMICAS3",434,0) new zi set zi="" "RTN","SAMICAS3",435,0) for set zi=$order(@froot@(zi)) quit:zi="" do ; "RTN","SAMICAS3",436,0) . new ftype set ftype=$piece(zi,"-",1) "RTN","SAMICAS3",437,0) . new fdate set fdate=$piece(zi,ftype_"-",2) "RTN","SAMICAS3",438,0) . new X,Y "RTN","SAMICAS3",439,0) . set X=fdate "RTN","SAMICAS3",440,0) . do ^%DT "RTN","SAMICAS3",441,0) . if Y=-1 do ^%ZTER quit ; "RTN","SAMICAS3",442,0) . set ARY(Y,zi)="" "RTN","SAMICAS3",443,0) . quit "RTN","SAMICAS3",444,0) ; "RTN","SAMICAS3",445,0) ; "RTN","SAMICAS3",446,0) ;@stanza 3 termination "RTN","SAMICAS3",447,0) ; "RTN","SAMICAS3",448,0) quit ; end of SORTFRMS "RTN","SAMICAS3",449,0) ; "RTN","SAMICAS3",450,0) ; "RTN","SAMICAS3",451,0) ; "RTN","SAMICAS3",452,0) MKCEFORM(sid,key) ; create ct evaluation form "RTN","SAMICAS3",453,0) ; "RTN","SAMICAS3",454,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMICAS3",455,0) ; "RTN","SAMICAS3",456,0) ;ven/gpl;private;procedure;clean;silent;sac; "RTN","SAMICAS3",457,0) ;@called-by "RTN","SAMICAS3",458,0) ; WSNFPOST^SAMICAS3 "RTN","SAMICAS3",459,0) ;@calls "RTN","SAMICAS3",460,0) ; $$setroot^%wd "RTN","SAMICAS3",461,0) ; $$SID2NUM^SAMIHOM3 "RTN","SAMICAS3",462,0) ; $$LASTCMP "RTN","SAMICAS3",463,0) ; CTCOPY^SAMICTC1 "RTN","SAMICAS3",464,0) ; SSAMISTA^SAMICASE "RTN","SAMICAS3",465,0) ; $$BASELNDT^SAMICAS3 "RTN","SAMICAS3",466,0) ; $$VAPALSDT^SAMICASE "RTN","SAMICAS3",467,0) ; $$LASTCMP^SAMICAS3 "RTN","SAMICAS3",468,0) ; $$PRIORCMP^SAMICAS3 "RTN","SAMICAS3",469,0) ;@input "RTN","SAMICAS3",470,0) ; sid = study id "RTN","SAMICAS3",471,0) ; key = form key, e.g. ceform-2021-05-25 "RTN","SAMICAS3",472,0) ;@output "RTN","SAMICAS3",473,0) ; @root@("graph",sid,key) "RTN","SAMICAS3",474,0) ;@examples [tbd] "RTN","SAMICAS3",475,0) ;@tests [tbd] "RTN","SAMICAS3",476,0) ; "RTN","SAMICAS3",477,0) ; "RTN","SAMICAS3",478,0) ;@stanza 2 create ct eval form "RTN","SAMICAS3",479,0) ; "RTN","SAMICAS3",480,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMICAS3",481,0) new sien set sien=$$SID2NUM^SAMIHOM3(sid) "RTN","SAMICAS3",482,0) quit:+sien=0 "RTN","SAMICAS3",483,0) new cdate set cdate=$piece(key,"ceform-",2) "RTN","SAMICAS3",484,0) ; "RTN","SAMICAS3",485,0) ; nodule copy "RTN","SAMICAS3",486,0) ; new srckey set srckey=$$PREVNOD(sid) "RTN","SAMICAS3",487,0) new srckey,srcdate set srcdate=$$LASTCMP(sid,.srckey) "RTN","SAMICAS3",488,0) if srckey'="" do ; "RTN","SAMICAS3",489,0) . new source set source=$name(@root@("graph",sid,srckey)) "RTN","SAMICAS3",490,0) . new target set target=$name(@root@("graph",sid,key)) "RTN","SAMICAS3",491,0) . do CTCOPY^SAMICTC1(source,target,key) "RTN","SAMICAS3",492,0) . quit "RTN","SAMICAS3",493,0) ; end nodule copy "RTN","SAMICAS3",494,0) ; "RTN","SAMICAS3",495,0) ; new items,prevct "RTN","SAMICAS3",496,0) ; do GETITEMS^SAMICASE("items",sid) "RTN","SAMICAS3",497,0) ; set prevct="" "RTN","SAMICAS3",498,0) ; if $data(items("type","vapals:ceform")) do ; previous cteval exists "RTN","SAMICAS3",499,0) ; . set prevct=$order(items("type","vapals:ceform",""),-1) ; latest ceform "RTN","SAMICAS3",500,0) ; . quit "RTN","SAMICAS3",501,0) ; if prevct'="" do ; "RTN","SAMICAS3",502,0) ; . new target,source "RTN","SAMICAS3",503,0) ; . set source=$name(@root@("graph",sid,prevct)) "RTN","SAMICAS3",504,0) ; . set target=$name(@root@("graph",sid,key)) "RTN","SAMICAS3",505,0) ; . do CTCOPY^SAMICTC1(source,target,key) "RTN","SAMICAS3",506,0) ; . quit "RTN","SAMICAS3",507,0) ; "RTN","SAMICAS3",508,0) merge @root@("graph",sid,key)=@root@(sien) "RTN","SAMICAS3",509,0) set @root@("graph",sid,key,"samicreatedate")=cdate "RTN","SAMICAS3",510,0) do SSAMISTA^SAMICASE(sid,key,"incomplete") "RTN","SAMICAS3",511,0) ; "RTN","SAMICAS3",512,0) ; set baseline CT date and last comparison scan date "RTN","SAMICAS3",513,0) do ; "RTN","SAMICAS3",514,0) . new basedt "RTN","SAMICAS3",515,0) . set basedt=$$BASELNDT^SAMICAS3(sid) "RTN","SAMICAS3",516,0) . if basedt=-1 set basedt=$$VAPALSDT^SAMICASE($$NOW^XLFDT) "RTN","SAMICAS3",517,0) . new lastdt set lastdt=$$LASTCMP^SAMICAS3(sid) "RTN","SAMICAS3",518,0) . if lastdt=-1 set lastdt=basedt "RTN","SAMICAS3",519,0) . new priordt set priordt=$$PRIORCMP^SAMICAS3(sid) "RTN","SAMICAS3",520,0) . if priordt=-1 set priordt=lastdt "RTN","SAMICAS3",521,0) . if priordt="" set priordt=lastdt "RTN","SAMICAS3",522,0) . set @root@("graph",sid,key,"sidoe")=basedt "RTN","SAMICAS3",523,0) . set @root@("graph",sid,key,"cedcs")=lastdt "RTN","SAMICAS3",524,0) . set @root@("graph",sid,key,"cedps")=priordt "RTN","SAMICAS3",525,0) . quit "RTN","SAMICAS3",526,0) ; "RTN","SAMICAS3",527,0) ; "RTN","SAMICAS3",528,0) ;@stanza 3 termination "RTN","SAMICAS3",529,0) ; "RTN","SAMICAS3",530,0) quit ; end of MKCEFORM "RTN","SAMICAS3",531,0) ; "RTN","SAMICAS3",532,0) ; "RTN","SAMICAS3",533,0) ; "RTN","SAMICAS3",534,0) MKFUFORM(sid,key) ; create Follow-up form "RTN","SAMICAS3",535,0) ; "RTN","SAMICAS3",536,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMICAS3",537,0) ; "RTN","SAMICAS3",538,0) ;ven/gpl;private;procedure;clean;silent;sac; "RTN","SAMICAS3",539,0) ;@called-by "RTN","SAMICAS3",540,0) ; WSNFPOST^SAMICAS3 "RTN","SAMICAS3",541,0) ;@calls "RTN","SAMICAS3",542,0) ; $$setroot^%wd "RTN","SAMICAS3",543,0) ; $$SID2NUM^SAMIHOM3 "RTN","SAMICAS3",544,0) ; $$KEY2DSPD^SAMICAS2 "RTN","SAMICAS3",545,0) ; $$BASELNDT "RTN","SAMICAS3",546,0) ; $$LASTCMP "RTN","SAMICAS3",547,0) ; $$NOW^XLFDT "RTN","SAMICAS3",548,0) ; $$VAPALSDT^SAMICASE "RTN","SAMICAS3",549,0) ; SSAMISTA^SAMICASE "RTN","SAMICAS3",550,0) ;@input "RTN","SAMICAS3",551,0) ; sid = study id "RTN","SAMICAS3",552,0) ; key = form key, e.g. fuform-2021-05-25 "RTN","SAMICAS3",553,0) ;@output "RTN","SAMICAS3",554,0) ; @root@("graph",sid,key) "RTN","SAMICAS3",555,0) ;@examples [tbd] "RTN","SAMICAS3",556,0) ;@tests [tbd] "RTN","SAMICAS3",557,0) ; "RTN","SAMICAS3",558,0) ; "RTN","SAMICAS3",559,0) ;@stanza 2 create Follow-up form "RTN","SAMICAS3",560,0) ; "RTN","SAMICAS3",561,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMICAS3",562,0) new sien set sien=$$SID2NUM^SAMIHOM3(sid) "RTN","SAMICAS3",563,0) quit:+sien=0 "RTN","SAMICAS3",564,0) ; "RTN","SAMICAS3",565,0) new cdate set cdate=$piece(key,"fuform-",2) "RTN","SAMICAS3",566,0) merge @root@("graph",sid,key)=@root@(sien) "RTN","SAMICAS3",567,0) ; "RTN","SAMICAS3",568,0) set @root@("graph",sid,key,"samicreatedate")=cdate "RTN","SAMICAS3",569,0) set @root@("graph",sid,key,"sidof")=$$KEY2DSPD^SAMICAS2(cdate) "RTN","SAMICAS3",570,0) new basedt "RTN","SAMICAS3",571,0) set basedt=$$BASELNDT^SAMICAS3(sid) "RTN","SAMICAS3",572,0) if basedt=-1 set basedt=$$LASTCMP^SAMICAS3(sid) "RTN","SAMICAS3",573,0) if basedt=-1 set basedt=$$VAPALSDT^SAMICASE($$NOW^XLFDT) "RTN","SAMICAS3",574,0) set @root@("graph",sid,key,"sidoe")=basedt "RTN","SAMICAS3",575,0) do SSAMISTA^SAMICASE(sid,key,"incomplete") "RTN","SAMICAS3",576,0) ; "RTN","SAMICAS3",577,0) ; "RTN","SAMICAS3",578,0) ;@stanza 3 termination "RTN","SAMICAS3",579,0) ; "RTN","SAMICAS3",580,0) quit ; end of MKFUFORM "RTN","SAMICAS3",581,0) ; "RTN","SAMICAS3",582,0) ; "RTN","SAMICAS3",583,0) ; "RTN","SAMICAS3",584,0) BASELNDT(sid) ; last previous baseline ct date "RTN","SAMICAS3",585,0) ; "RTN","SAMICAS3",586,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMICAS3",587,0) ; "RTN","SAMICAS3",588,0) ;ven/gpl;private;function;clean;silent;sac "RTN","SAMICAS3",589,0) ;@called-by "RTN","SAMICAS3",590,0) ; MKCEFORM "RTN","SAMICAS3",591,0) ; MKFUFORM "RTN","SAMICAS3",592,0) ; MKPTFORM "RTN","SAMICAS3",593,0) ; MKITFORM "RTN","SAMICAS3",594,0) ;@calls "RTN","SAMICAS3",595,0) ; $$setroot^%wd "RTN","SAMICAS3",596,0) ; GETITEMS^SAMICASE "RTN","SAMICAS3",597,0) ; $$KEY2DSPD^SAMICAS2 "RTN","SAMICAS3",598,0) ;@input "RTN","SAMICAS3",599,0) ; sid = study id "RTN","SAMICAS3",600,0) ;@output = last previous baseline ct date "RTN","SAMICAS3",601,0) ;@examples [tbd] "RTN","SAMICAS3",602,0) ;@tests [tbd] "RTN","SAMICAS3",603,0) ; "RTN","SAMICAS3",604,0) ; "RTN","SAMICAS3",605,0) ;@stanza 2 calculate last previous baseline ct date "RTN","SAMICAS3",606,0) ; "RTN","SAMICAS3",607,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMICAS3",608,0) new groot set groot=$name(@root@("graph",sid)) "RTN","SAMICAS3",609,0) new items set items="" "RTN","SAMICAS3",610,0) do GETITEMS^SAMICASE("items",sid) "RTN","SAMICAS3",611,0) quit:'$data(items) "" "RTN","SAMICAS3",612,0) ; "RTN","SAMICAS3",613,0) new bdate set bdate="" "RTN","SAMICAS3",614,0) new bkey set bkey="" "RTN","SAMICAS3",615,0) new done set done=0 "RTN","SAMICAS3",616,0) for set bkey=$order(items("type","vapals:ceform",bkey)) quit:bkey="" do ; "RTN","SAMICAS3",617,0) . ; write !,bkey," ",$get(@groot@(bkey,"cetex")) "RTN","SAMICAS3",618,0) . if $get(@groot@(bkey,"cetex"))="b" do ; "RTN","SAMICAS3",619,0) . . set done=1 "RTN","SAMICAS3",620,0) . . set bdate=$piece(bkey,"ceform-",2) "RTN","SAMICAS3",621,0) . . quit "RTN","SAMICAS3",622,0) . quit "RTN","SAMICAS3",623,0) set bdate=$$KEY2DSPD^SAMICAS2(bdate) "RTN","SAMICAS3",624,0) ; "RTN","SAMICAS3",625,0) ; "RTN","SAMICAS3",626,0) ;@stanza 3 termination "RTN","SAMICAS3",627,0) ; "RTN","SAMICAS3",628,0) quit bdate ; end of $$BASELNDT "RTN","SAMICAS3",629,0) ; "RTN","SAMICAS3",630,0) ; "RTN","SAMICAS3",631,0) ; "RTN","SAMICAS3",632,0) MKPTFORM(sid,key) ; create pet evaluation form "RTN","SAMICAS3",633,0) ; "RTN","SAMICAS3",634,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMICAS3",635,0) ; "RTN","SAMICAS3",636,0) ;ven/gpl;private;procedure;clean;silent;sac "RTN","SAMICAS3",637,0) ;@called-by "RTN","SAMICAS3",638,0) ; WSNFPOST^SAMICAS3 "RTN","SAMICAS3",639,0) ;@calls "RTN","SAMICAS3",640,0) ; $$setroot^%wd "RTN","SAMICAS3",641,0) ; $$SID2NUM^SAMIHOM3 "RTN","SAMICAS3",642,0) ; $$LASTCMP "RTN","SAMICAS3",643,0) ; CTCOPY^SAMICTC1 "RTN","SAMICAS3",644,0) ; SSAMISTA^SAMICASE "RTN","SAMICAS3",645,0) ; $$BASELNDT^SAMICAS3 "RTN","SAMICAS3",646,0) ; $$VAPALSDT^SAMICASE "RTN","SAMICAS3",647,0) ; $$LASTCMP^SAMICAS3 "RTN","SAMICAS3",648,0) ; $$PRIORCMP^SAMICAS3 "RTN","SAMICAS3",649,0) ;@input "RTN","SAMICAS3",650,0) ; sid = study id "RTN","SAMICAS3",651,0) ; key = form key, e.g. ptform-2021-05-25 "RTN","SAMICAS3",652,0) ;@output "RTN","SAMICAS3",653,0) ; @root@("graph",sid,key) "RTN","SAMICAS3",654,0) ;@examples [tbd] "RTN","SAMICAS3",655,0) ;@tests [tbd] "RTN","SAMICAS3",656,0) ; "RTN","SAMICAS3",657,0) ; "RTN","SAMICAS3",658,0) ;@stanza 2 create pet eval form "RTN","SAMICAS3",659,0) ; "RTN","SAMICAS3",660,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMICAS3",661,0) new sien set sien=$$SID2NUM^SAMIHOM3(sid) "RTN","SAMICAS3",662,0) quit:+sien=0 "RTN","SAMICAS3",663,0) ; "RTN","SAMICAS3",664,0) ; nodule copy "RTN","SAMICAS3",665,0) ; new srckey set srckey=$$PREVNOD(sid) "RTN","SAMICAS3",666,0) new srckey,srcdate set srcdate=$$LASTCMP(sid,.srckey) "RTN","SAMICAS3",667,0) if srckey'="" do ; "RTN","SAMICAS3",668,0) . new source set source=$name(@root@("graph",sid,srckey)) "RTN","SAMICAS3",669,0) . new target set target=$name(@root@("graph",sid,key)) "RTN","SAMICAS3",670,0) . do CTCOPY^SAMICTC1(source,target,key) "RTN","SAMICAS3",671,0) . quit "RTN","SAMICAS3",672,0) ; end nodule copy "RTN","SAMICAS3",673,0) ; "RTN","SAMICAS3",674,0) new cdate set cdate=$piece(key,"ptform-",2) "RTN","SAMICAS3",675,0) merge @root@("graph",sid,key)=@root@(sien) "RTN","SAMICAS3",676,0) set @root@("graph",sid,key,"samicreatedate")=cdate "RTN","SAMICAS3",677,0) do SSAMISTA^SAMICASE(sid,key,"incomplete") "RTN","SAMICAS3",678,0) ; "RTN","SAMICAS3",679,0) do ; "RTN","SAMICAS3",680,0) . new basedt "RTN","SAMICAS3",681,0) . set basedt=$$BASELNDT^SAMICAS3(sid) "RTN","SAMICAS3",682,0) . if basedt=-1 set basedt=$$VAPALSDT^SAMICASE($$NOW^XLFDT) "RTN","SAMICAS3",683,0) . new lastdt set lastdt=$$LASTCMP^SAMICAS3(sid) "RTN","SAMICAS3",684,0) . if lastdt=-1 set lastdt=basedt "RTN","SAMICAS3",685,0) . new priordt set priordt=$$PRIORCMP^SAMICAS3(sid) "RTN","SAMICAS3",686,0) . if priordt=-1 set priordt=lastdt "RTN","SAMICAS3",687,0) . set @root@("graph",sid,key,"sidoe")=basedt "RTN","SAMICAS3",688,0) . ; set @root@("graph",sid,key,"cedcs")=lastdt "RTN","SAMICAS3",689,0) . set @root@("graph",sid,key,"cedos")=lastdt ; it's different than on the ce "RTN","SAMICAS3",690,0) . ; set @root@("graph",sid,key,"cedps")=priordt "RTN","SAMICAS3",691,0) . quit "RTN","SAMICAS3",692,0) ; "RTN","SAMICAS3",693,0) ; "RTN","SAMICAS3",694,0) ;@stanza 3 termination "RTN","SAMICAS3",695,0) ; "RTN","SAMICAS3",696,0) quit ; end of MKPTFORM "RTN","SAMICAS3",697,0) ; "RTN","SAMICAS3",698,0) ; "RTN","SAMICAS3",699,0) ; "RTN","SAMICAS3",700,0) MKITFORM(sid,key) ; create intervention form "RTN","SAMICAS3",701,0) ; "RTN","SAMICAS3",702,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMICAS3",703,0) ; "RTN","SAMICAS3",704,0) ;ven/gpl;private;procedure;clean;silent;sac "RTN","SAMICAS3",705,0) ;@called-by "RTN","SAMICAS3",706,0) ; WSNFPOST^SAMICAS3 "RTN","SAMICAS3",707,0) ;@calls "RTN","SAMICAS3",708,0) ; $$setroot^%wd "RTN","SAMICAS3",709,0) ; $$SID2NUM^SAMIHOM3 "RTN","SAMICAS3",710,0) ; $$PREVNODE [commented out] "RTN","SAMICAS3",711,0) ; $$LASTCMP "RTN","SAMICAS3",712,0) ; CTCOPY^SAMICTC1 "RTN","SAMICAS3",713,0) ; SSAMISTA^SAMICASE "RTN","SAMICAS3",714,0) ; $$BASELNDT^SAMICAS3 "RTN","SAMICAS3",715,0) ; $$VAPALSDT^SAMICASE "RTN","SAMICAS3",716,0) ; $$LASTCMP^SAMICAS3 "RTN","SAMICAS3",717,0) ; $$PRIORCMP^SAMICAS3 "RTN","SAMICAS3",718,0) ;@input "RTN","SAMICAS3",719,0) ; sid = study id "RTN","SAMICAS3",720,0) ; key = form key, e.g. itform-2021-05-25 "RTN","SAMICAS3",721,0) ;@output "RTN","SAMICAS3",722,0) ; @root@("graph",sid,key) "RTN","SAMICAS3",723,0) ;@examples [tbd] "RTN","SAMICAS3",724,0) ;@tests [tbd] "RTN","SAMICAS3",725,0) ; "RTN","SAMICAS3",726,0) ; "RTN","SAMICAS3",727,0) ;@stanza 2 create intervention form "RTN","SAMICAS3",728,0) ; "RTN","SAMICAS3",729,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMICAS3",730,0) new sien set sien=$$SID2NUM^SAMIHOM3(sid) "RTN","SAMICAS3",731,0) quit:+sien=0 "RTN","SAMICAS3",732,0) ; "RTN","SAMICAS3",733,0) new cdate set cdate=$piece(key,"itform-",2) "RTN","SAMICAS3",734,0) ; "RTN","SAMICAS3",735,0) ; nodule copy "RTN","SAMICAS3",736,0) ; new srckey set srckey=$$PREVNOD(sid) "RTN","SAMICAS3",737,0) new srckey,srcdate set srcdate=$$LASTCMP(sid,.srckey) "RTN","SAMICAS3",738,0) if srckey'="" do ; "RTN","SAMICAS3",739,0) . new source set source=$name(@root@("graph",sid,srckey)) "RTN","SAMICAS3",740,0) . new target set target=$name(@root@("graph",sid,key)) "RTN","SAMICAS3",741,0) . do CTCOPY^SAMICTC1(source,target,key) "RTN","SAMICAS3",742,0) . quit "RTN","SAMICAS3",743,0) ; end nodule copy "RTN","SAMICAS3",744,0) ; "RTN","SAMICAS3",745,0) merge @root@("graph",sid,key)=@root@(sien) "RTN","SAMICAS3",746,0) set @root@("graph",sid,key,"samicreatedate")=cdate "RTN","SAMICAS3",747,0) do SSAMISTA^SAMICASE(sid,key,"incomplete") "RTN","SAMICAS3",748,0) ; "RTN","SAMICAS3",749,0) do ; "RTN","SAMICAS3",750,0) . new basedt "RTN","SAMICAS3",751,0) . set basedt=$$BASELNDT^SAMICAS3(sid) "RTN","SAMICAS3",752,0) . if basedt=-1 set basedt=$$VAPALSDT^SAMICASE($$NOW^XLFDT) "RTN","SAMICAS3",753,0) . new lastdt set lastdt=$$LASTCMP^SAMICAS3(sid) "RTN","SAMICAS3",754,0) . if lastdt=-1 set lastdt=basedt "RTN","SAMICAS3",755,0) . new priordt set priordt=$$PRIORCMP^SAMICAS3(sid) "RTN","SAMICAS3",756,0) . if priordt=-1 set priordt=lastdt "RTN","SAMICAS3",757,0) . set @root@("graph",sid,key,"sidoe")=basedt "RTN","SAMICAS3",758,0) . ; set @root@("graph",sid,key,"cedcs")=lastdt "RTN","SAMICAS3",759,0) . set @root@("graph",sid,key,"cedos")=lastdt ; it's different than on the ce "RTN","SAMICAS3",760,0) . ; set @root@("graph",sid,key,"cedps")=priordt "RTN","SAMICAS3",761,0) . quit "RTN","SAMICAS3",762,0) ; "RTN","SAMICAS3",763,0) ; "RTN","SAMICAS3",764,0) ;@stanza 3 termination "RTN","SAMICAS3",765,0) ; "RTN","SAMICAS3",766,0) quit ; end of MKITFORM "RTN","SAMICAS3",767,0) ; "RTN","SAMICAS3",768,0) ; "RTN","SAMICAS3",769,0) ; "RTN","SAMICAS3",770,0) MKBXFORM(sid,key) ; create biopsy form "RTN","SAMICAS3",771,0) ; "RTN","SAMICAS3",772,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMICAS3",773,0) ; "RTN","SAMICAS3",774,0) ;ven/gpl;private;procedure;clean;silent;sac "RTN","SAMICAS3",775,0) ;@called-by "RTN","SAMICAS3",776,0) ; WSNFPOST^SAMICAS3 "RTN","SAMICAS3",777,0) ;@calls "RTN","SAMICAS3",778,0) ; $$setroot^%wd "RTN","SAMICAS3",779,0) ; $$SID2NUM^SAMIHOM3 "RTN","SAMICAS3",780,0) ; $$LASTCMP "RTN","SAMICAS3",781,0) ; CTCOPY^SAMICTC1 "RTN","SAMICAS3",782,0) ; SSAMISTA^SAMICASE "RTN","SAMICAS3",783,0) ;@input "RTN","SAMICAS3",784,0) ; sid = study id "RTN","SAMICAS3",785,0) ; key = form key, e.g. bxform-2021-05-25 "RTN","SAMICAS3",786,0) ;@output "RTN","SAMICAS3",787,0) ; @root@("graph",sid,key) "RTN","SAMICAS3",788,0) ;@examples [tbd] "RTN","SAMICAS3",789,0) ;@tests [tbd] "RTN","SAMICAS3",790,0) ; "RTN","SAMICAS3",791,0) ; "RTN","SAMICAS3",792,0) ;@stanza 2 create background form "RTN","SAMICAS3",793,0) ; "RTN","SAMICAS3",794,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMICAS3",795,0) new sien set sien=$$SID2NUM^SAMIHOM3(sid) "RTN","SAMICAS3",796,0) quit:+sien=0 "RTN","SAMICAS3",797,0) new cdate set cdate=$piece(key,"bxform-",2) "RTN","SAMICAS3",798,0) ; "RTN","SAMICAS3",799,0) ; nodule copy "RTN","SAMICAS3",800,0) ; new srckey set srckey=$$PREVNOD(sid) "RTN","SAMICAS3",801,0) new srckey,srcdate set srcdate=$$LASTCMP(sid,.srckey) "RTN","SAMICAS3",802,0) if srckey'="" do ; "RTN","SAMICAS3",803,0) . new source set source=$name(@root@("graph",sid,srckey)) "RTN","SAMICAS3",804,0) . new target set target=$name(@root@("graph",sid,key)) "RTN","SAMICAS3",805,0) . do CTCOPY^SAMICTC1(source,target,key) "RTN","SAMICAS3",806,0) . quit "RTN","SAMICAS3",807,0) ; end nodule copy "RTN","SAMICAS3",808,0) ; "RTN","SAMICAS3",809,0) merge @root@("graph",sid,key)=@root@(sien) "RTN","SAMICAS3",810,0) set @root@("graph",sid,key,"samicreatedate")=cdate "RTN","SAMICAS3",811,0) do SSAMISTA^SAMICASE(sid,key,"incomplete") "RTN","SAMICAS3",812,0) ; "RTN","SAMICAS3",813,0) ; "RTN","SAMICAS3",814,0) ;@stanza 3 termination "RTN","SAMICAS3",815,0) ; "RTN","SAMICAS3",816,0) quit ; end of MKBXFORM "RTN","SAMICAS3",817,0) ; "RTN","SAMICAS3",818,0) ; "RTN","SAMICAS3",819,0) ; "RTN","SAMICAS3",820,0) CASETBL(ary) ; generates case review table "RTN","SAMICAS3",821,0) ; "RTN","SAMICAS3",822,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMICAS3",823,0) ; "RTN","SAMICAS3",824,0) ;ven/gpl;private;procedure;clean;silent;sac "RTN","SAMICAS3",825,0) ;@called by none "RTN","SAMICAS3",826,0) ;@calls "RTN","SAMICAS3",827,0) ;@input "RTN","SAMICAS3",828,0) ; ary = name of array (passed by name, will be cleared) "RTN","SAMICAS3",829,0) ;@output "RTN","SAMICAS3",830,0) ; @ary "RTN","SAMICAS3",831,0) ;@tests "RTN","SAMICAS3",832,0) ; SAMIUTS2 "RTN","SAMICAS3",833,0) ; "RTN","SAMICAS3",834,0) ; "RTN","SAMICAS3",835,0) ;@stanza 2 build table "RTN","SAMICAS3",836,0) ; "RTN","SAMICAS3",837,0) kill @ary "RTN","SAMICAS3",838,0) ; "RTN","SAMICAS3",839,0) set @ary@("siform","form")="siform" "RTN","SAMICAS3",840,0) set @ary@("siform","js")="subPr" "RTN","SAMICAS3",841,0) set @ary@("siform","name")="Intake" "RTN","SAMICAS3",842,0) set @ary@("siform","image")="preview.gif" "RTN","SAMICAS3",843,0) ; "RTN","SAMICAS3",844,0) set @ary@("nuform","form")="nuform" "RTN","SAMICAS3",845,0) set @ary@("nuform","js")="subFr" "RTN","SAMICAS3",846,0) set @ary@("nuform","name")="New Form" "RTN","SAMICAS3",847,0) set @ary@("nuform","image")="nform.gif" "RTN","SAMICAS3",848,0) ; "RTN","SAMICAS3",849,0) set @ary@("sched","form")="sched" "RTN","SAMICAS3",850,0) set @ary@("sched","js")="subSc" "RTN","SAMICAS3",851,0) set @ary@("sched","name")="Schedule" "RTN","SAMICAS3",852,0) set @ary@("sched","image")="schedule.gif" "RTN","SAMICAS3",853,0) ; "RTN","SAMICAS3",854,0) set @ary@("sbform","form")="sbform" "RTN","SAMICAS3",855,0) set @ary@("sbform","js")="subPr" "RTN","SAMICAS3",856,0) set @ary@("sbform","name")="Background" "RTN","SAMICAS3",857,0) set @ary@("sbform","image")="preview.gif" "RTN","SAMICAS3",858,0) ; "RTN","SAMICAS3",859,0) set @ary@("ceform","form")="ceform" "RTN","SAMICAS3",860,0) set @ary@("ceform","js")="subPr" "RTN","SAMICAS3",861,0) set @ary@("ceform","name")="CT Evaluation" "RTN","SAMICAS3",862,0) set @ary@("ceform","image")="preview.gif" "RTN","SAMICAS3",863,0) ; "RTN","SAMICAS3",864,0) set @ary@("report","form")="report" "RTN","SAMICAS3",865,0) set @ary@("report","js")="subRp" "RTN","SAMICAS3",866,0) set @ary@("report","name")="Report" "RTN","SAMICAS3",867,0) set @ary@("report","image")="report.gif" "RTN","SAMICAS3",868,0) ; "RTN","SAMICAS3",869,0) set @ary@("ptform","form")="ptform" "RTN","SAMICAS3",870,0) set @ary@("ptform","js")="subPr" "RTN","SAMICAS3",871,0) set @ary@("ptform","name")="PET Evaluation" "RTN","SAMICAS3",872,0) set @ary@("ptform","image")="preview.gif" "RTN","SAMICAS3",873,0) ; "RTN","SAMICAS3",874,0) set @ary@("bxform","form")="bxform" "RTN","SAMICAS3",875,0) set @ary@("bxform","js")="subPr" "RTN","SAMICAS3",876,0) set @ary@("bxform","name")="Biopsy" "RTN","SAMICAS3",877,0) set @ary@("bxform","image")="preview.gif" "RTN","SAMICAS3",878,0) ; "RTN","SAMICAS3",879,0) set @ary@("rbform","form")="rbform" "RTN","SAMICAS3",880,0) set @ary@("rbform","js")="subPr" "RTN","SAMICAS3",881,0) set @ary@("rbform","name")="Intervention" "RTN","SAMICAS3",882,0) set @ary@("rbform","image")="preview.gif" "RTN","SAMICAS3",883,0) ; "RTN","SAMICAS3",884,0) set @ary@("ceform","form")="ceform" "RTN","SAMICAS3",885,0) set @ary@("ceform","js")="subPr" "RTN","SAMICAS3",886,0) set @ary@("ceform","name")="CT Evaluation" "RTN","SAMICAS3",887,0) set @ary@("ceform","image")="preview.gif" "RTN","SAMICAS3",888,0) ; "RTN","SAMICAS3",889,0) ; "RTN","SAMICAS3",890,0) ;@stanza 3 termination "RTN","SAMICAS3",891,0) ; "RTN","SAMICAS3",892,0) quit ; end of CASETBL "RTN","SAMICAS3",893,0) ; "RTN","SAMICAS3",894,0) ; "RTN","SAMICAS3",895,0) ; "RTN","SAMICAS3",896,0) EOR ; end of routine SAMICAS3 "RTN","SAMICASE") 0^3^B2476673 "RTN","SAMICASE",1,0) SAMICASE ;ven/gpl - case review library ;2021-07-06T15:44Z "RTN","SAMICASE",2,0) ;;18.0;SAMI;**1,12**;2020-01;Build 6 "RTN","SAMICASE",3,0) ;;1.18.0.12-t3+i12 "RTN","SAMICASE",4,0) ; "RTN","SAMICASE",5,0) ; SAMICASE contains ppis and other services to support processing "RTN","SAMICASE",6,0) ; of the VAPALS-IELCAP case review page. "RTN","SAMICASE",7,0) ; "RTN","SAMICASE",8,0) quit ; no entry from top "RTN","SAMICASE",9,0) ; "RTN","SAMICASE",10,0) ; "RTN","SAMICASE",11,0) ; "RTN","SAMICASE",12,0) ;@section 0 primary development "RTN","SAMICASE",13,0) ; "RTN","SAMICASE",14,0) ; "RTN","SAMICASE",15,0) ; "RTN","SAMICASE",16,0) ;@license see routine SAMIUL "RTN","SAMICASE",17,0) ;@documentation see SAMICUL "RTN","SAMICASE",18,0) ;@contents "RTN","SAMICASE",19,0) ; (all public interfaces) "RTN","SAMICASE",20,0) ; "RTN","SAMICASE",21,0) ; "RTN","SAMICASE",22,0) ; "RTN","SAMICASE",23,0) ;@section 1 web-route interfaces "RTN","SAMICASE",24,0) ; "RTN","SAMICASE",25,0) ; "RTN","SAMICASE",26,0) ; "RTN","SAMICASE",27,0) ;@wri WSCASE^SAMICASE, post vapals casereview: generate case review page "RTN","SAMICASE",28,0) WSCASE(rtn,filter) goto WSCASE^SAMICAS2 "RTN","SAMICASE",29,0) ; "RTN","SAMICASE",30,0) ; "RTN","SAMICASE",31,0) ; "RTN","SAMICASE",32,0) ;@wri WSNUFORM^SAMICASE, post vapals nuform: new form for patient "RTN","SAMICASE",33,0) WSNUFORM(rtn,filter) goto WSNUFORM^SAMICAS2 "RTN","SAMICASE",34,0) ; "RTN","SAMICASE",35,0) ; "RTN","SAMICASE",36,0) ; "RTN","SAMICASE",37,0) ;@wri DELFORM^SAMICASE, post vapals deleteform: delete incomplete form "RTN","SAMICASE",38,0) DELFORM(RESULT,ARGS) goto DELFORM^SAMICAS2 "RTN","SAMICASE",39,0) ; "RTN","SAMICASE",40,0) ; "RTN","SAMICASE",41,0) ; "RTN","SAMICASE",42,0) ;@wri WSNFPOST^SAMICASE, post vapals addform: new form "RTN","SAMICASE",43,0) WSNFPOST(ARGS,BODY,RESULT) goto WSNFPOST^SAMICAS3 "RTN","SAMICASE",44,0) ; "RTN","SAMICASE",45,0) ; "RTN","SAMICASE",46,0) ; "RTN","SAMICASE",47,0) ;@section 2 private program interfaces "RTN","SAMICASE",48,0) ; "RTN","SAMICASE",49,0) ; "RTN","SAMICASE",50,0) ; "RTN","SAMICASE",51,0) ;@ppi GETTMPL^SAMICASE, get html template "RTN","SAMICASE",52,0) GETTMPL(return,form) goto GETTMPL^SAMICAS2 "RTN","SAMICASE",53,0) ; "RTN","SAMICASE",54,0) ; "RTN","SAMICASE",55,0) ; "RTN","SAMICASE",56,0) ;@ppi GETITEMS^SAMICASE, get items available for studyid "RTN","SAMICASE",57,0) GETITEMS(ary,sid) goto GETITEMS^SAMICAS2 "RTN","SAMICASE",58,0) ; "RTN","SAMICASE",59,0) ; "RTN","SAMICASE",60,0) ; "RTN","SAMICASE",61,0) ;@ppi $$NOTEHREF^SAMICASE, html list of notes for form "RTN","SAMICASE",62,0) NOTEHREF(sid,form) goto NOTEHREF^SAMICAS2 "RTN","SAMICASE",63,0) ; "RTN","SAMICASE",64,0) ; "RTN","SAMICASE",65,0) ; "RTN","SAMICASE",66,0) ;@ppi $$VAPALSDT^SAMICASE, date in vapals format "RTN","SAMICASE",67,0) VAPALSDT(fmdate) goto VAPALSDT^SAMICAS2 "RTN","SAMICASE",68,0) ; "RTN","SAMICASE",69,0) ; "RTN","SAMICASE",70,0) ; "RTN","SAMICASE",71,0) ;@ppi $$KEY2FM^SAMICASE, convert key to fileman date "RTN","SAMICASE",72,0) KEY2FM(key) goto KEY2FM^SAMICAS2 "RTN","SAMICASE",73,0) ; "RTN","SAMICASE",74,0) ; "RTN","SAMICASE",75,0) ; "RTN","SAMICASE",76,0) ;@ppi SSAMISTA^SAMICASE, set samistatus to val in form "RTN","SAMICASE",77,0) SSAMISTA(sid,form,val) goto SSAMISTA^SAMICAS2 "RTN","SAMICASE",78,0) ; "RTN","SAMICASE",79,0) ; "RTN","SAMICASE",80,0) ; "RTN","SAMICASE",81,0) EOR ; end of routine SAMICASE "RTN","SAMICLOG") 0^4^B37383898 "RTN","SAMICLOG",1,0) SAMICLOG ;ven/gpl - intake form change log ;2021-07-01t16:28z "RTN","SAMICLOG",2,0) ;;18.0;SAMI;**12**;2020-01;Build 6 "RTN","SAMICLOG",3,0) ;;1.18.0.12-t3+i12 "RTN","SAMICLOG",4,0) ; "RTN","SAMICLOG",5,0) ; Routine SAMICLOG contains subroutines for implementing the VAPALS- "RTN","SAMICLOG",6,0) ; ELCAP Intake Form's Change Log field. "RTN","SAMICLOG",7,0) ; "RTN","SAMICLOG",8,0) quit ; no entry from top "RTN","SAMICLOG",9,0) ; "RTN","SAMICLOG",10,0) ; "RTN","SAMICLOG",11,0) ; "RTN","SAMICLOG",12,0) ;@section 0 primary development "RTN","SAMICLOG",13,0) ; "RTN","SAMICLOG",14,0) ; "RTN","SAMICLOG",15,0) ; "RTN","SAMICLOG",16,0) ;@routine-credits "RTN","SAMICLOG",17,0) ;@primary-dev George P. Lilly (gpl) "RTN","SAMICLOG",18,0) ; gpl@vistaexpertise.net "RTN","SAMICLOG",19,0) ;@primary-dev-org Vista Expertise Network (ven) "RTN","SAMICLOG",20,0) ; http://vistaexpertise.net "RTN","SAMICLOG",21,0) ;@copyright 2017/2021, gpl, all rights reserved "RTN","SAMICLOG",22,0) ;@license see routine SAMIUL "RTN","SAMICLOG",23,0) ; "RTN","SAMICLOG",24,0) ;@last-updated 2021-07-01t16:28z "RTN","SAMICLOG",25,0) ;@application Screening Applications Management (SAM) "RTN","SAMICLOG",26,0) ;@module Screening Applications Management - IELCAP (SAMI) "RTN","SAMICLOG",27,0) ;@suite-of-files SAMI Forms (311.101-311.199) "RTN","SAMICLOG",28,0) ;@version 1.18.0.12-t3+i12 "RTN","SAMICLOG",29,0) ;@release-date 2020-01 "RTN","SAMICLOG",30,0) ;@patch-list **12** "RTN","SAMICLOG",31,0) ; "RTN","SAMICLOG",32,0) ;@additional-dev Larry G. Carlson (lgc) "RTN","SAMICLOG",33,0) ; lgc@vistaexpertise.net "RTN","SAMICLOG",34,0) ;@additional-dev Frederick D. S. Marshall (toad) "RTN","SAMICLOG",35,0) ; toad@vistaexpertise.net "RTN","SAMICLOG",36,0) ;@additional-dev Kenneth W. McGlothlen (mcglk) "RTN","SAMICLOG",37,0) ; mcglk@vistaexpertise.net "RTN","SAMICLOG",38,0) ; "RTN","SAMICLOG",39,0) ;@routine-log repo github.com:VA-PALS-ELCAP/SAMI-VAPALS-ELCAP.git "RTN","SAMICLOG",40,0) ; 2019-03-20 ven/gpl 1.18.0-t4 e1e7c136 "RTN","SAMICLOG",41,0) ; SAMICLOG progress on intake form change log. "RTN","SAMICLOG",42,0) ; "RTN","SAMICLOG",43,0) ; 2019-03-25/26 ven/lgc 1.18.0-t4 12ab8234,b9a71a56,e0106403,fb73dfe5 "RTN","SAMICLOG",44,0) ; SAMICLOG update change log & tests, repair var name, inhibit "RTN","SAMICLOG",45,0) ; change log during 1st entry. "RTN","SAMICLOG",46,0) ; "RTN","SAMICLOG",47,0) ; 2019-08-03 ven/gpl 1.18.0-t4 bea65f7b "RTN","SAMICLOG",48,0) ; SAMICLOG fix bugs in Have you ever smoked processing in change log "RTN","SAMICLOG",49,0) ; & intake note. "RTN","SAMICLOG",50,0) ; "RTN","SAMICLOG",51,0) ; 2021-06-18 ven/gpl 1.18.0.12-t2+i12 68ebd6fa "RTN","SAMICLOG",52,0) ; SAMICLOG fix crash in processing text field for change log: in "RTN","SAMICLOG",53,0) ; DOLOGIT add screens if "field","C",var node undefined. "RTN","SAMICLOG",54,0) ; "RTN","SAMICLOG",55,0) ; 2021-07-01 ven/mcglk&toad 1.18.0.12-t2+i12 cbf7e46b "RTN","SAMICLOG",56,0) ; SAMICLOG bump version & dates, add hdr comments & dev log. "RTN","SAMICLOG",57,0) ; "RTN","SAMICLOG",58,0) ;@contents "RTN","SAMICLOG",59,0) ; CLOG adds to the intake form change log "RTN","SAMICLOG",60,0) ; RUNVARS ??? "RTN","SAMICLOG",61,0) ; DOLOGIT ??? "RTN","SAMICLOG",62,0) ; LOGIT add an entry to the log "RTN","SAMICLOG",63,0) ; INTKVARS variables on intake form "RTN","SAMICLOG",64,0) ; "RTN","SAMICLOG",65,0) ; "RTN","SAMICLOG",66,0) ; "RTN","SAMICLOG",67,0) ;@section 1 subroutines "RTN","SAMICLOG",68,0) ; "RTN","SAMICLOG",69,0) ; "RTN","SAMICLOG",70,0) ; "RTN","SAMICLOG",71,0) CLOG(sid,form,vars) ; adds to the intake form change log "RTN","SAMICLOG",72,0) ; if changes have been made "RTN","SAMICLOG",73,0) ; "RTN","SAMICLOG",74,0) n root,CLOGROOT,var "RTN","SAMICLOG",75,0) s root=$$setroot^%wd("vapals-patients") "RTN","SAMICLOG",76,0) ; "RTN","SAMICLOG",77,0) ;If samifirsttime is true, then this is the first submission "RTN","SAMICLOG",78,0) ; for the intake form and we will not need to check "RTN","SAMICLOG",79,0) ; for changes "RTN","SAMICLOG",80,0) q:($g(@root@("graph",sid,form,"samifirsttime"))="true") "RTN","SAMICLOG",81,0) ; "RTN","SAMICLOG",82,0) s CLOGROOT=$na(@root@("graph",sid,form,"changelog")) "RTN","SAMICLOG",83,0) ; "RTN","SAMICLOG",84,0) n old "RTN","SAMICLOG",85,0) s old=$na(@root@("graph",sid,form)) ; location of saved old variables "RTN","SAMICLOG",86,0) ; "RTN","SAMICLOG",87,0) ; date of contact "RTN","SAMICLOG",88,0) ; "RTN","SAMICLOG",89,0) n ndoc,odoc "RTN","SAMICLOG",90,0) s ndoc=$g(@vars@("sidc")) "RTN","SAMICLOG",91,0) s odoc=$g(@old@("sidc")) "RTN","SAMICLOG",92,0) if ndoc'=odoc d ; "RTN","SAMICLOG",93,0) . n entry s entry="Date of contact changed from "_odoc_" to "_ndoc "RTN","SAMICLOG",94,0) . d LOGIT(CLOGROOT,entry) "RTN","SAMICLOG",95,0) ; "RTN","SAMICLOG",96,0) ; contacted via "RTN","SAMICLOG",97,0) ; "RTN","SAMICLOG",98,0) n ovia,nvia,zg "RTN","SAMICLOG",99,0) s (ovia,nvia)="" "RTN","SAMICLOG",100,0) f zg="ovia","nvia" d ; "RTN","SAMICLOG",101,0) . n zn "RTN","SAMICLOG",102,0) . if zg="ovia" s zn=old "RTN","SAMICLOG",103,0) . if zg="nvia" s zn=vars "RTN","SAMICLOG",104,0) . i $g(@zn@("silnip"))=1 d ; "RTN","SAMICLOG",105,0) . . s @zg="in person" "RTN","SAMICLOG",106,0) . i $g(@zn@("silnph"))=1 d ; "RTN","SAMICLOG",107,0) . . s @zg=$s(@zg'="":@zg_",",1:@zg)_" telephone" "RTN","SAMICLOG",108,0) . i $g(@zn@("silnth"))=1 d ; "RTN","SAMICLOG",109,0) . . s @zg=$s(@zg'="":@zg_",",1:@zg)_" telehealth" "RTN","SAMICLOG",110,0) . i $g(@zn@("silnml"))=1 d ; "RTN","SAMICLOG",111,0) . . s @zg=$s(@zg'="":@zg_",",1:@zg)_" mailed letter" "RTN","SAMICLOG",112,0) . i $g(@zn@("silnpp"))=1 d ; "RTN","SAMICLOG",113,0) . . s @zg=$s(@zg'="":@zg_",",1:@zg)_" patient portal" "RTN","SAMICLOG",114,0) . i $g(@zn@("silnvd"))=1 d ; "RTN","SAMICLOG",115,0) . . s @zg=$s(@zg'="":@zg_",",1:@zg)_" VOD" "RTN","SAMICLOG",116,0) . i $g(@zn@("silnot"))=1 d ; "RTN","SAMICLOG",117,0) . . s @zg=$s(@zg'="":@zg_",",1:@zg)_" Other contact method YN" "RTN","SAMICLOG",118,0) s ovia=$s(ovia="":"null",1:ovia) "RTN","SAMICLOG",119,0) s nvia=$s(nvia="":"null",1:nvia) "RTN","SAMICLOG",120,0) i ovia'=nvia d ; "RTN","SAMICLOG",121,0) . d LOGIT(CLOGROOT,"Contacted via changed from "_ovia_" to "_nvia) "RTN","SAMICLOG",122,0) ; "RTN","SAMICLOG",123,0) ; "RTN","SAMICLOG",124,0) ; "RTN","SAMICLOG",125,0) RUNVARS n cnt s cnt=0 "RTN","SAMICLOG",126,0) f s cnt=cnt+1 s var=$p($t(INTKVARS+cnt),";;",2) q:(var="") d "RTN","SAMICLOG",127,0) . s var=$p($p($t(INTKVARS+cnt),";;",2),"^") "RTN","SAMICLOG",128,0) . s entry=$p($p($t(INTKVARS+cnt),";;",2),"^",2)_" changed from " "RTN","SAMICLOG",129,0) . d DOLOGIT(.vars,.old,var,entry) "RTN","SAMICLOG",130,0) q "RTN","SAMICLOG",131,0) ; "RTN","SAMICLOG",132,0) ; "RTN","SAMICLOG",133,0) ; "RTN","SAMICLOG",134,0) DOLOGIT(vars,old,var,entry) ; "RTN","SAMICLOG",135,0) ;Input "RTN","SAMICLOG",136,0) ; vars = name of array with new results (e.g. poo("sildct")=1) "RTN","SAMICLOG",137,0) ; old = $na(@root@("graph",sid,form)) ; location of saved old variables "RTN","SAMICLOG",138,0) ; var = name of VAPALS variable whose value changed (e.g. sildct) "RTN","SAMICLOG",139,0) ; entry = prompt for entering value (e.g. Patient opted to) "RTN","SAMICLOG",140,0) ;Exit "RTN","SAMICLOG",141,0) ; sets new "changelog" node in vapals-patients graphstore documenting "RTN","SAMICLOG",142,0) ; "RTN","SAMICLOG",143,0) n rootdd s rootdd=$$setroot^%wd("form fields - intake") "RTN","SAMICLOG",144,0) n newval,oldval,nvtrans,ovtrans "RTN","SAMICLOG",145,0) s newval=$g(@vars@(var)) i '(newval="") d "RTN","SAMICLOG",146,0) . q:'$d(@rootdd@("field","C",var)) "RTN","SAMICLOG",147,0) . s nvtrans=$o(@rootdd@("field","C",var,newval,"")) "RTN","SAMICLOG",148,0) . s:'(nvtrans="") newval=nvtrans "RTN","SAMICLOG",149,0) s:(newval="") newval="null" "RTN","SAMICLOG",150,0) s oldval=$g(@old@(var)) i '(oldval="") d "RTN","SAMICLOG",151,0) . q:'$d(@rootdd@("field","C",var)) "RTN","SAMICLOG",152,0) . s ovtrans=$o(@rootdd@("field","C",var,oldval,"")) "RTN","SAMICLOG",153,0) . s:'(ovtrans="") oldval=ovtrans "RTN","SAMICLOG",154,0) s:(oldval="") oldval="null" "RTN","SAMICLOG",155,0) q:(newval=oldval) "RTN","SAMICLOG",156,0) s entry=entry_oldval_" to: "_newval "RTN","SAMICLOG",157,0) d LOGIT(CLOGROOT,entry) "RTN","SAMICLOG",158,0) q "RTN","SAMICLOG",159,0) ; "RTN","SAMICLOG",160,0) ; "RTN","SAMICLOG",161,0) ; "RTN","SAMICLOG",162,0) LOGIT(CLOGROOT,ENTRY) ; add an entry to the log "RTN","SAMICLOG",163,0) ; CLOGROOT points to the log "RTN","SAMICLOG",164,0) ; "RTN","SAMICLOG",165,0) n logdt "RTN","SAMICLOG",166,0) ;s logdt=$$VAPALSDT^SAMICASE($$NOW^XLFDT) "RTN","SAMICLOG",167,0) s logdt=$$FMTE^XLFDT($$NOW^XLFDT,5) "RTN","SAMICLOG",168,0) n lien "RTN","SAMICLOG",169,0) s lien=$o(@CLOGROOT@(""),-1)+1 "RTN","SAMICLOG",170,0) s @CLOGROOT@(lien)="["_logdt_"] "_$g(ENTRY) "RTN","SAMICLOG",171,0) q "RTN","SAMICLOG",172,0) ; "RTN","SAMICLOG",173,0) ; "RTN","SAMICLOG",174,0) ; "RTN","SAMICLOG",175,0) INTKVARS ; Varibles on intake form "RTN","SAMICLOG",176,0) ;;silnoo^Other contact method "RTN","SAMICLOG",177,0) ;;sipav^Primary address verified "RTN","SAMICLOG",178,0) ;;sipsa^Preferred address "RTN","SAMICLOG",179,0) ;;sipan^Apt# "RTN","SAMICLOG",180,0) ;;spicn^County "RTN","SAMICLOG",181,0) ;;sipc^City "RTN","SAMICLOG",182,0) ;;sips^State "RTN","SAMICLOG",183,0) ;;sipz^Zip "RTN","SAMICLOG",184,0) ;;sipcr^Country "RTN","SAMICLOG",185,0) ;;sippn^Phone number "RTN","SAMICLOG",186,0) ;;sirs^Rural status "RTN","SAMICLOG",187,0) ;;siesm^Have you ever smoked "RTN","SAMICLOG",188,0) ;;siesq^Willing to quit smoking "RTN","SAMICLOG",189,0) ;;sicpd^Cigarettes per day "RTN","SAMICLOG",190,0) ;;sisny^Number of years a smoker "RTN","SAMICLOG",191,0) ;;siq^Date quit smoking "RTN","SAMICLOG",192,0) ;;sicep^Smoking cessation education provided "RTN","SAMICLOG",193,0) ;;siadx^Lung CA Dx date "RTN","SAMICLOG",194,0) ;;siadxl^Lung CA Dx location not VA "RTN","SAMICLOG",195,0) ;;siptct^CT date "RTN","SAMICLOG",196,0) ;;siptctl^CT location not VA "RTN","SAMICLOG",197,0) ;;siidmdc^Informed decision making discussion complete "RTN","SAMICLOG",198,0) ;;sildct^Patient opted to "RTN","SAMICLOG",199,0) ;;siclin^Clinical idications for screening "RTN","SAMICLOG",200,0) ;;sistatus^Enrollment status "RTN","SAMICLOG",201,0) ;; "RTN","SAMICLOG",202,0) ; "RTN","SAMICLOG",203,0) ; "RTN","SAMICLOG",204,0) ; "RTN","SAMICLOG",205,0) EOR ; end of routine SAMICLOG "RTN","SAMICUL") 0^5^B144065 "RTN","SAMICUL",1,0) SAMICUL ;ven/gpl - case review log ;2021-07-06t15:44z "RTN","SAMICUL",2,0) ;;18.0;SAMI;**9,11,12**;2020-01;Build 6 "RTN","SAMICUL",3,0) ;;1.18.0.12-t3+i12 "RTN","SAMICUL",4,0) ; "RTN","SAMICUL",5,0) ; SAMICUL contains the development log for the VAPALS-IELCAP Case "RTN","SAMICUL",6,0) ; Review Page (SAMICA* routines). "RTN","SAMICUL",7,0) ; It contains no executable code. "RTN","SAMICUL",8,0) ; "RTN","SAMICUL",9,0) quit ; no entry from top "RTN","SAMICUL",10,0) ; "RTN","SAMICUL",11,0) ; "RTN","SAMICUL",12,0) ; "RTN","SAMICUL",13,0) ;@section 0 primary development "RTN","SAMICUL",14,0) ; "RTN","SAMICUL",15,0) ; "RTN","SAMICUL",16,0) ; "RTN","SAMICUL",17,0) ;@routine-credits "RTN","SAMICUL",18,0) ;@primary-dev George P. Lilly (gpl) "RTN","SAMICUL",19,0) ; gpl@vistaexpertise.net "RTN","SAMICUL",20,0) ;@primary-dev-org Vista Expertise Network (ven) "RTN","SAMICUL",21,0) ; http://vistaexpertise.net "RTN","SAMICUL",22,0) ;@copyright 2017/2021, gpl, all rights reserved "RTN","SAMICUL",23,0) ;@license see routine SAMIUL "RTN","SAMICUL",24,0) ; "RTN","SAMICUL",25,0) ;@last-updated 2021-07-06t15:44z "RTN","SAMICUL",26,0) ;@application Screening Applications Management (SAM) "RTN","SAMICUL",27,0) ;@module Screening Applications Management - IELCAP (SAMI) "RTN","SAMICUL",28,0) ;@suite-of-files SAMI Forms (311.101-311.199) "RTN","SAMICUL",29,0) ;@version 1.18.0.12-t3+i12 "RTN","SAMICUL",30,0) ;@release-date 2020-01 "RTN","SAMICUL",31,0) ;@patch-list **9,11,12** "RTN","SAMICUL",32,0) ; "RTN","SAMICUL",33,0) ;@additional-dev Frederick D. S. Marshall (toad) "RTN","SAMICUL",34,0) ; toad@vistaexpertise.net "RTN","SAMICUL",35,0) ;@additional-dev Linda M. R. Yaw (lmry) "RTN","SAMICUL",36,0) ; linda.yaw@vistaexpertise.net "RTN","SAMICUL",37,0) ;@additional-dev Larry G. Carlson (lgc) "RTN","SAMICUL",38,0) ; larry.g.carlson@gmail.com "RTN","SAMICUL",39,0) ;@additional-dev Domenick DiNatale (ddn) "RTN","SAMICUL",40,0) ; domenic@intellitechinnovations.com "RTN","SAMICUL",41,0) ;@additional-dev Kenneth McGlothlen (mcglk) "RTN","SAMICUL",42,0) ; mcglk@vistaexpertise.net "RTN","SAMICUL",43,0) ; "RTN","SAMICUL",44,0) ;@module-credits "RTN","SAMICUL",45,0) ;@project VA Partnership to Increase Access to Lung Screening "RTN","SAMICUL",46,0) ; (VA-PALS) "RTN","SAMICUL",47,0) ; http://va-pals.org/ "RTN","SAMICUL",48,0) ;@funding 2017/2021, Bristol-Myers Squibb Foundation (bmsf) "RTN","SAMICUL",49,0) ; https://www.bms.com/about-us/responsibility/bristol-myers-squibb-foundation.html "RTN","SAMICUL",50,0) ;@partner-org Veterans Affairs Office of Rural health "RTN","SAMICUL",51,0) ; https://www.ruralhealth.va.gov/ "RTN","SAMICUL",52,0) ;@partner-org International Early Lung Cancer Action Program (I-ELCAP) "RTN","SAMICUL",53,0) ; http://ielcap.com/ "RTN","SAMICUL",54,0) ;@partner-org Paraxial Technologies (par) "RTN","SAMICUL",55,0) ; http://paraxialtech.com/ "RTN","SAMICUL",56,0) ;@partner-org Open Source Electronic Health Record Alliance (OSEHRA) "RTN","SAMICUL",57,0) ; https://www.osehra.org/groups/va-pals-open-source-project-group "RTN","SAMICUL",58,0) ; "RTN","SAMICUL",59,0) ;@module-log repo github.com:VA-PALS-ELCAP/SAMI-VAPALS-ELCAP.git "RTN","SAMICUL",60,0) ; "RTN","SAMICUL",61,0) ; 2018-01-14 ven/gpl 1.18.0-t04 "RTN","SAMICUL",62,0) ; SAMICASE split from routine SAMIFRM, incl wsCASE,GETTMPL,GETITEMS, "RTN","SAMICUL",63,0) ; casetbl. "RTN","SAMICUL",64,0) ; "RTN","SAMICUL",65,0) ; 2018-02-05/08 ven/toad 1.18.0-t04 "RTN","SAMICUL",66,0) ; SAMICASE update style, license, & attribution, spell out language "RTN","SAMICUL",67,0) ; elements, add white space & do-dot quits, r/replaceAll^%wfhfrom w/ "RTN","SAMICUL",68,0) ; replaceAll^%wf, r/$$getTemplate^%wfhform w/$$getTemplate^%wf. "RTN","SAMICUL",69,0) ; "RTN","SAMICUL",70,0) ; 2018-02-14 ven/toad 1.18.0-t04 "RTN","SAMICUL",71,0) ; SAMICASE r/replaceAll^%wf w/findReplaceAll^%wf, r/ln w/line, add "RTN","SAMICUL",72,0) ; @calls & @called-by tags, break up some long lines. "RTN","SAMICUL",73,0) ; "RTN","SAMICUL",74,0) ; 2018-02-27 ven/gpl 1.18.0-t04 "RTN","SAMICUL",75,0) ; SAMICASE new subroutines $$KEY2DSPD, $$GETDTKEY; in wsCASE get "RTN","SAMICUL",76,0) ; 1st & last names from graph, fix paths, key forms in graph w/date. "RTN","SAMICUL",77,0) ; "RTN","SAMICUL",78,0) ; 2018-03-01 ven/toad 1.18.0-t04 "RTN","SAMICUL",79,0) ; SAMICASE refactor & reorganize new code, add header comments, r/ "RTN","SAMICUL",80,0) ; findReplaceAll^%wf w/findReplace^%ts. "RTN","SAMICUL",81,0) ; "RTN","SAMICUL",82,0) ; 2018-03-06 ven/gpl 1.18.0-t04 "RTN","SAMICUL",83,0) ; SAMICASE add New Form button, list rest of forms for patient, add "RTN","SAMICUL",84,0) ; web services wsNuForm & wsNuFormPost & method MKCEFORM, extend "RTN","SAMICUL",85,0) ; GETITEMS to get rest of forms. "RTN","SAMICUL",86,0) ; "RTN","SAMICUL",87,0) ; 2018-03-07/08 ven/toad 1.18.0-t04 "RTN","SAMICUL",88,0) ; SAMICASE merge George changes w/ rest, add white space, spell out "RTN","SAMICUL",89,0) ; M elements, add hdr comments to new subroutines, r/findReplace^%wf "RTN","SAMICUL",90,0) ; & replaceAll^%wf w/findReplace^%ts. "RTN","SAMICUL",91,0) ; "RTN","SAMICUL",92,0) ; 2018-03-11 ven/gpl 1.18.0-t04 9bd663ee "RTN","SAMICUL",93,0) ; SAMICAS2 vapals forms working. "RTN","SAMICUL",94,0) ; "RTN","SAMICUL",95,0) ; 2018-03-12 ven/gpl 1.18.0-t04 8c36c6a7 "RTN","SAMICUL",96,0) ; SAMICAS2 new form works now & charts on home page. "RTN","SAMICUL",97,0) ; "RTN","SAMICUL",98,0) ; 2018-03-14 ven/gpl 1.18.0-t04 9653650a "RTN","SAMICUL",99,0) ; SAMICAS2 revised casereview page link, fixed external url "RTN","SAMICUL",100,0) ; preservation. "RTN","SAMICUL",101,0) ; "RTN","SAMICUL",102,0) ; 2018-03-21 ven/gpl 1.18.0-t04 48868561 "RTN","SAMICUL",103,0) ; SAMICAS2 max date insertion, case review navigation changed to "RTN","SAMICUL",104,0) ; post, date order for CT Eval in case review. "RTN","SAMICUL",105,0) ; "RTN","SAMICUL",106,0) ; 2018-03-26 ven/gpl 1.18.0-t04 5fa4ee96 "RTN","SAMICUL",107,0) ; SAMICAS2 changes to support incomplete forms display & "RTN","SAMICUL",108,0) ; processing. "RTN","SAMICUL",109,0) ; "RTN","SAMICUL",110,0) ; 2018-03-27 ven/gpl 1.18.0-t04 cace9756 "RTN","SAMICUL",111,0) ; SAMICAS2 siforms are always complete. "RTN","SAMICUL",112,0) ; "RTN","SAMICUL",113,0) ; 2018-04-02 ven/gpl 1.18.0-t04 00da9146 "RTN","SAMICUL",114,0) ; SAMICAS2 added followup form. "RTN","SAMICUL",115,0) ; "RTN","SAMICUL",116,0) ; 2018-04-24 ven/gpl 1.18.0-t04 22e39d87 "RTN","SAMICUL",117,0) ; SAMICAS2 added pet & biopsy forms. "RTN","SAMICUL",118,0) ; "RTN","SAMICUL",119,0) ; 2018-05-01 ven/gpl 1.18.0-t04 f1751c43 "RTN","SAMICUL",120,0) ; SAMICAS2 fix problem with new forms: followup & pet. "RTN","SAMICUL",121,0) ; "RTN","SAMICUL",122,0) ; 2018-05-18 ven/lgc 1.18.0-t04 9eba8f8c "RTN","SAMICUL",123,0) ; SAMICAS2 conversion to new graph and simplified forms processing. "RTN","SAMICUL",124,0) ; "RTN","SAMICUL",125,0) ; 2018-05-21 ven/lgc 1.18.0-t04 0d7ed2f7 "RTN","SAMICUL",126,0) ; SAMICAS2 changes for new navigation html. "RTN","SAMICUL",127,0) ; "RTN","SAMICUL",128,0) ; 2018-06-14 ven/lgc 1.18.0-t04 d71f4fe4 "RTN","SAMICUL",129,0) ; SAMICAS2 changes to make the background form optional. "RTN","SAMICUL",130,0) ; "RTN","SAMICUL",131,0) ; 2018-06-20 ven/lgc 1.18.0-t04 bf03b07f "RTN","SAMICUL",132,0) ; SAMICAS2 corrections for new forms processing navigation. "RTN","SAMICUL",133,0) ; "RTN","SAMICUL",134,0) ; 2018-07-01 ven/lgc 1.18.0-t04 2e1541dc,8b0a4329 "RTN","SAMICUL",135,0) ; SAMICAS2 add intervention forms to case review page, 1st version "RTN","SAMICUL",136,0) ; of ct eval report. "RTN","SAMICUL",137,0) ; "RTN","SAMICUL",138,0) ; 2018-07-04 ven/lgc 1.18.0-t04 b28c1658 "RTN","SAMICUL",139,0) ; SAMICAS2 fix a typo. "RTN","SAMICUL",140,0) ; "RTN","SAMICUL",141,0) ; 2018-07-10 ven/lgc 1.18.0-t04 2e9662b4 "RTN","SAMICUL",142,0) ; SAMICAS2 repair SAMIHOM3 & redact report link. "RTN","SAMICUL",143,0) ; "RTN","SAMICUL",144,0) ; 2018-08-19 ven/lgc 1.18.0-t04 2ce0cab4 "RTN","SAMICUL",145,0) ; SAMICAS2 use ssn instead of last5 where available. "RTN","SAMICUL",146,0) ; "RTN","SAMICUL",147,0) ; 2018-08-20 ven/lgc 1.18.0-t04 955fd484 "RTN","SAMICUL",148,0) ; SAMICAS2 fix case review page cr lf issue. "RTN","SAMICUL",149,0) ; "RTN","SAMICUL",150,0) ; 2018-08-22 ven/gpl 1.18.0-t04 d67a2fe5 "RTN","SAMICUL",151,0) ; SAMICAS2 turn off ctreport. "RTN","SAMICUL",152,0) ; "RTN","SAMICUL",153,0) ; 2018-08-30 ven/lgc 1.18.0-t04 125f1c8b "RTN","SAMICUL",154,0) ; SAMICAS2 add type index to getItems to help find last previous "RTN","SAMICUL",155,0) ; form of a type. "RTN","SAMICUL",156,0) ; "RTN","SAMICUL",157,0) ; 2018-09-04 ven/lgc 1.18.0-t04 3e6e326f "RTN","SAMICUL",158,0) ; SAMICAS2 hide report link. "RTN","SAMICUL",159,0) ; "RTN","SAMICUL",160,0) ; 2018-10-14 ven/lgc 1.18.0-t04 f6e1229f "RTN","SAMICUL",161,0) ; SAMICAS2 turn on copy forward for cteval new forms. "RTN","SAMICUL",162,0) ; "RTN","SAMICUL",163,0) ; 2018-10-26 ven/lgc 1.18.0-t04 f19bf1ae "RTN","SAMICUL",164,0) ; SAMICAS2 ability to add multiple forms on same day. "RTN","SAMICUL",165,0) ; "RTN","SAMICUL",166,0) ; 2018-11-07 ven/gpl 1.18.0-t04 c76b2eac "RTN","SAMICUL",167,0) ; SAMICAS2 defend against unit test patient 1. "RTN","SAMICUL",168,0) ; "RTN","SAMICUL",169,0) ; 2018-11-13 ven/toad 1.18.0-t04 "RTN","SAMICUL",170,0) ; SAMICAS2 SAMIHOM2 > SAMIHOM3. "RTN","SAMICUL",171,0) ; "RTN","SAMICUL",172,0) ; 2018-11-14 ven/lgc 1.18.0-t04 6e9799ba "RTN","SAMICUL",173,0) ; SAMICUL fix graphstore forms. "RTN","SAMICUL",174,0) ; "RTN","SAMICUL",175,0) ; 2018-11-28 ven/lgc 1.18.0-t04 a9539464 "RTN","SAMICUL",176,0) ; SAMICAS2 work on sac compliance. "RTN","SAMICUL",177,0) ; "RTN","SAMICUL",178,0) ; 2018-12-11 ven/lgc 1.18.0-t04 3ceb74b5 "RTN","SAMICUL",179,0) ; SAMICAS2 update for sac compliance. "RTN","SAMICUL",180,0) ; "RTN","SAMICUL",181,0) ; 2018-12-19/20 ven/lgc 1.18.0-t04 7a5d3400,a14554c1 "RTN","SAMICUL",182,0) ; SAMICAS2 more sac compliance, r/^gpl w/^SAMIGPL. "RTN","SAMICUL",183,0) ; "RTN","SAMICUL",184,0) ; 2018-12-26 ven/lgc 1.18.0-t04 8dd6f34d,51eb1635 "RTN","SAMICUL",185,0) ; SAMICAS2 update for sac compliance, fix accidental reversions. "RTN","SAMICUL",186,0) ; "RTN","SAMICUL",187,0) ; 2019-01-10 ven/lgc 1.18.0-t04 2daba010 "RTN","SAMICUL",188,0) ; SAMICAS2 update for SAC compliance. "RTN","SAMICUL",189,0) ; "RTN","SAMICUL",190,0) ; 2019-01-22 ven/lgc 1.18.0-t04 53681219,5ddb29c5 "RTN","SAMICUL",191,0) ; SAMICAS2 add license info to each SAMI routine; edit for lower "RTN","SAMICUL",192,0) ; case initials. "RTN","SAMICUL",193,0) ; "RTN","SAMICUL",194,0) ; 2019-02-18 ven/lgc 1.18.0-t04 76874314 "RTN","SAMICUL",195,0) ; SAMICAS2,SAMICAS3 update recently edited routines. "RTN","SAMICUL",196,0) ; "RTN","SAMICUL",197,0) ; 2019-03-13 ven/lmry 1.18.0-t04 ef66ef16 "RTN","SAMICUL",198,0) ; SAMICAS2 spell out some elements missed earlier. "RTN","SAMICUL",199,0) ; "RTN","SAMICUL",200,0) ; 2019-03-14 ven/lmry 1.18.0-t04 038507e2 "RTN","SAMICUL",201,0) ; SAMICAS3 spell out some missed M elements, fix copy/paste errors "RTN","SAMICUL",202,0) ; in comments for MKFUFORM, MKBXFORM, & MKPTFORM. "RTN","SAMICUL",203,0) ; "RTN","SAMICUL",204,0) ; 2019-04-16 ven/lgc 1.18.0-t04 e54b76d1 "RTN","SAMICUL",205,0) ; SAMICAS2 update for SAMIFORM project. "RTN","SAMICUL",206,0) ; "RTN","SAMICUL",207,0) ; 2019-04-23 ven/gpl 1.18.0-t04 ce322911 "RTN","SAMICUL",208,0) ; SAMICAS2 add intake notes to case review page. "RTN","SAMICUL",209,0) ; "RTN","SAMICUL",210,0) ; 2019-06-18 ven/lgc 1.18.0-t04 91022482 "RTN","SAMICUL",211,0) ; SAMICAS3 switch fr/global ^SAMIGPL to/^SAMIUL. "RTN","SAMICUL",212,0) ; "RTN","SAMICUL",213,0) ; 2019-07-01 ven/gpl 1.18.0-t04 cc87cc44 "RTN","SAMICUL",214,0) ; SAMICAS3 prevent >1 bkgd form/patient. "RTN","SAMICUL",215,0) ; "RTN","SAMICUL",216,0) ; 2019-07-07 ven/gpl 1.18.0-t04 776f7451 "RTN","SAMICUL",217,0) ; SAMICAS3 resolving can't create bkgd form, branch messed up. "RTN","SAMICUL",218,0) ; "RTN","SAMICUL",219,0) ; 2019-08-01 ven/lgc 1.18.0-t04 d710f27d "RTN","SAMICUL",220,0) ; SAMICAS2 pull displayed facility code from Vista parameter. "RTN","SAMICUL",221,0) ; "RTN","SAMICUL",222,0) ; 2019-09-26 ven/gpl 1.18.0-t04 92b12324 vap-420 "RTN","SAMICUL",223,0) ; SAMICAS3 prefill form date & date of baseline ct on new followup "RTN","SAMICUL",224,0) ; form. "RTN","SAMICUL",225,0) ; "RTN","SAMICUL",226,0) ; 2019-10-01 par/ddn 1.18.0-t04 4caf1a98 vap-344 "RTN","SAMICUL",227,0) ; SAMICAS2 use proper capitalization of the word "veteran". "RTN","SAMICUL",228,0) ; "RTN","SAMICUL",229,0) ; 2020-01-11 ven/lgc 1.18.0.1+i1 5651698a "RTN","SAMICUL",230,0) ; SAMICAS2,SAMICAS3 fix duplicate form overwriting. "RTN","SAMICUL",231,0) ; "RTN","SAMICUL",232,0) ; 2020-01-17 ven/lgc 1.18.0.1+i1 8557207f "RTN","SAMICUL",233,0) ; SAMICAS2 followup note. "RTN","SAMICUL",234,0) ; "RTN","SAMICUL",235,0) ; 2020-01-25 ven/lgc 1.18.0.3+i3 6a07a860,6a947567 "RTN","SAMICUL",236,0) ; SAMICAS3 nodule copy & fix to ru, fix subtle bug in nodule copy. "RTN","SAMICUL",237,0) ; "RTN","SAMICUL",238,0) ; 2020-04-11 ven/gpl 1.18.0.5+i5 666f5b91,2f2c29c1 "RTN","SAMICUL",239,0) ; SAMICAS2 multi-tenancy. "RTN","SAMICUL",240,0) ; "RTN","SAMICUL",241,0) ; 2020-05-12 ven/gpl 1.18.0.5+i5 ad11e0ea "RTN","SAMICUL",242,0) ; SAMICAS2 fix SITE on case review page. "RTN","SAMICUL",243,0) ; "RTN","SAMICUL",244,0) ; 2020-11-12 ven/gpl 1.18.0.9+i9 cec1ccd6 "RTN","SAMICUL",245,0) ; SAMICAS2,SAMICAS3 ceform date refill upgrade. "RTN","SAMICUL",246,0) ; "RTN","SAMICUL",247,0) ; 2020-11-13 ven/gpl 1.18.0.9+i9 dce3c568 "RTN","SAMICUL",248,0) ; SAMICAS3 prefill ceform prior scans text field. "RTN","SAMICUL",249,0) ; "RTN","SAMICUL",250,0) ; 2021-02-18 ven/gpl 1.18.0.9+i9 af2a0b8a "RTN","SAMICUL",251,0) ; SAMICAS3 copy last previous CT nodules instead of last nodules in "RTN","SAMICUL",252,0) ; any form. "RTN","SAMICUL",253,0) ; "RTN","SAMICUL",254,0) ; 2021-02-21 ven/gpl 1.18.0.9+i9 3fd704fb "RTN","SAMICUL",255,0) ; SAMICAS3 fix bug in prefill logic. "RTN","SAMICUL",256,0) ; "RTN","SAMICUL",257,0) ; 2021-03-02 ven/gpl 1.18.0.9+i9 479dc041 "RTN","SAMICUL",258,0) ; SAMICAS2 return error msg if no CT Eval form exists when "RTN","SAMICUL",259,0) ; generating a FU note. "RTN","SAMICUL",260,0) ; "RTN","SAMICUL",261,0) ; 2021-03-10 ven/toad 1.18.0.9+i9 a46a2cc1 "RTN","SAMICUL",262,0) ; SAMICUL update log, convert to new vistaver schema. "RTN","SAMICUL",263,0) ; SAMICAS2,SAMICAS3 bump date & patch list, update contents, lt "RTN","SAMICUL",264,0) ; refactor. "RTN","SAMICUL",265,0) ; "RTN","SAMICUL",266,0) ; 2021-03-17 ven/toad 1.18.0.9+i9 62da30b "RTN","SAMICUL",267,0) ; SAMICAS2 fix xindex errors: in WSCASE add missing space between "RTN","SAMICUL",268,0) ; do & comment to prevent syntax error reported as block mismatch. "RTN","SAMICUL",269,0) ; SAMICAS3 remove extra spaces at ends of 3 lines. "RTN","SAMICUL",270,0) ; "RTN","SAMICUL",271,0) ; 2021-04-16 ven/gpl 1.18.0.11+i11 ac82eec "RTN","SAMICUL",272,0) ; SAMICAS3 include baseline scan in prior scans field on prefill. "RTN","SAMICUL",273,0) ; "RTN","SAMICUL",274,0) ; 2021-05-14/19 ven/gpl 1.18.0.11+i11 0cbee7b,a21b056,139c6a5,0a0cccc "RTN","SAMICUL",275,0) ; SAMICAS3 improved CT eval prefill of past scan dates, urgent "RTN","SAMICUL",276,0) ; fixes to CT Report & intervention & pet form prefill. "RTN","SAMICUL",277,0) ; "RTN","SAMICUL",278,0) ; 2021-05-20/21 ven/mcglk&toad 1.18.0.11+i11 43a4557,424ea11,129e96b "RTN","SAMICUL",279,0) ; SAMICAS3 bump version & dates. "RTN","SAMICUL",280,0) ; "RTN","SAMICUL",281,0) ; 2021-05-24 ven/gpl 1.18.0.11+i11 4aba1a9 "RTN","SAMICUL",282,0) ; SAMICAS3 in MKCEFORM,MKPTFORM,MKBXFORM pass key to "RTN","SAMICUL",283,0) ; CTCOPY^SAMICTC1 to modulate node-copy operation; critical fix to "RTN","SAMICUL",284,0) ; copy forward for is it new field for new ct eval forms. "RTN","SAMICUL",285,0) ; "RTN","SAMICUL",286,0) ; 2021-05-25 ven/toad 1.18.0.11+i11 801d7c74 "RTN","SAMICUL",287,0) ; SAMICAS3 bump date; passim lt refactor. "RTN","SAMICUL",288,0) ; "RTN","SAMICUL",289,0) ; 2021-05-26/27 ven/gpl 1.18.0.11+i11 6edc0610,73728821 "RTN","SAMICUL",290,0) ; SAMICAS3 in MKITFORM add new nodule-copy block to copy forward "RTN","SAMICUL",291,0) ; for intervention form; in LASTCMP,PRIORCMP init tdt to today to "RTN","SAMICUL",292,0) ; start before today, to fix last comp & prior scan field prefill in "RTN","SAMICUL",293,0) ; ct eval form. "RTN","SAMICUL",294,0) ; "RTN","SAMICUL",295,0) ; 2021-06-01 ven/toad 1.18.0.11+i11 7dd9410c "RTN","SAMICUL",296,0) ; SAMICAS3 fold in gpl chgs fr 2021-05-26/27, annotate, adjust news "RTN","SAMICUL",297,0) ; in nodule copy blocks, bump date. "RTN","SAMICUL",298,0) ; "RTN","SAMICUL",299,0) ; 2021-06-29 ven/gpl 1.18.0.12-t2+i12 50d3998b,a5bbd37a "RTN","SAMICUL",300,0) ; SAMICAS3 in LASTCMP fix bug that excluded ct forms from today in "RTN","SAMICUL",301,0) ; date list, init tdt to today+1 to start today; text-box formatting "RTN","SAMICUL",302,0) ; for intake & followup notes, new text-processing utils; in MKFUFORM "RTN","SAMICUL",303,0) ; set basedt to $$BASELNDT or $$LASTCMP or now. "RTN","SAMICUL",304,0) ; "RTN","SAMICUL",305,0) ; 2021-06-30/07-06 ven/mcglk&toad&gpl 1.18.0.12-t2+i12 cbf7e46b, "RTN","SAMICUL",306,0) ; d8296fda,b248664b "RTN","SAMICUL",307,0) ; SAMICASE,2,3 bump version & dates. "RTN","SAMICUL",308,0) ; SAMICAS3 in MKFUFORM,LASTCMP update calls & called-by. "RTN","SAMICUL",309,0) ; SAMICASE,2,3 finish converting to ppi format, annotate; fix typos. "RTN","SAMICUL",310,0) ; "RTN","SAMICUL",311,0) ;@contents "RTN","SAMICUL",312,0) ; SAMICASE case review "RTN","SAMICUL",313,0) ; SAMICAS2 case review continued "RTN","SAMICUL",314,0) ; SAMICAS3 case review continued "RTN","SAMICUL",315,0) ; SAMICUL case review log "RTN","SAMICUL",316,0) ; "RTN","SAMICUL",317,0) ; "RTN","SAMICUL",318,0) ; "RTN","SAMICUL",319,0) EOR ; end of routine SAMICUL "RTN","SAMIHOM3") 0^6^B168256875 "RTN","SAMIHOM3",1,0) SAMIHOM3 ;ven/gpl - homepage web service ;2021-07-01t21:35z "RTN","SAMIHOM3",2,0) ;;18.0;SAMI;**5,12**;2020-01;Build 6 "RTN","SAMIHOM3",3,0) ;;1.18.0.12-t3+i12 "RTN","SAMIHOM3",4,0) ; "RTN","SAMIHOM3",5,0) ; Routine SAMIHOM3 contains subroutines for implementing the IELCAP "RTN","SAMIHOM3",6,0) ; Home Page and to provide binding to VistA. "RTN","SAMIHOM3",7,0) ; "RTN","SAMIHOM3",8,0) quit ; no entry from top "RTN","SAMIHOM3",9,0) ; "RTN","SAMIHOM3",10,0) ; "RTN","SAMIHOM3",11,0) ; "RTN","SAMIHOM3",12,0) ;@section 0 primary development "RTN","SAMIHOM3",13,0) ; "RTN","SAMIHOM3",14,0) ; "RTN","SAMIHOM3",15,0) ; "RTN","SAMIHOM3",16,0) ;@routine-credits "RTN","SAMIHOM3",17,0) ;@license see routine SAMIUL "RTN","SAMIHOM3",18,0) ;@documentation see SAMIHUL "RTN","SAMIHOM3",19,0) ; "RTN","SAMIHOM3",20,0) ;@routine-credits "RTN","SAMIHOM3",21,0) ;@primary-dev George P. Lilly (gpl) "RTN","SAMIHOM3",22,0) ; gpl@vistaexpertise.net "RTN","SAMIHOM3",23,0) ;@primary-dev-org Vista Expertise Network (ven) "RTN","SAMIHOM3",24,0) ; http://vistaexpertise.net "RTN","SAMIHOM3",25,0) ;@copyright 2017/2021, gpl, all rights reserved "RTN","SAMIHOM3",26,0) ;@license Apache 2.0 "RTN","SAMIHOM3",27,0) ; https://www.apache.org/licenses/LICENSE-2.0.html "RTN","SAMIHOM3",28,0) ; "RTN","SAMIHOM3",29,0) ;@last-updated 2021-07-01t21:35z "RTN","SAMIHOM3",30,0) ;@application Screening Applications Management (SAM) "RTN","SAMIHOM3",31,0) ;@module Screening Applications Management - IELCAP (SAMI) "RTN","SAMIHOM3",32,0) ;@suite-of-files SAMI Forms (311.101-311.199) "RTN","SAMIHOM3",33,0) ;@version 1.18.0.12-t3+i12 "RTN","SAMIHOM3",34,0) ;@release-date 2020-01 "RTN","SAMIHOM3",35,0) ;@patch-list **5,12** "RTN","SAMIHOM3",36,0) ; "RTN","SAMIHOM3",37,0) ;@additional-dev Frederick D. S. Marshall (toad) "RTN","SAMIHOM3",38,0) ; toad@vistaexpertise.net "RTN","SAMIHOM3",39,0) ;@additional-dev Kenneth W. McGlothlen (mcglk) "RTN","SAMIHOM3",40,0) ; mcglk@vistaexpertise.net "RTN","SAMIHOM3",41,0) ; "RTN","SAMIHOM3",42,0) ;@routine-log repo github.com:VA-PALS-ELCAP/SAMI-VAPALS-ELCAP.git "RTN","SAMIHOM3",43,0) ; see routine SAMIHUL "RTN","SAMIHOM3",44,0) ;@contents "RTN","SAMIHOM3",45,0) ; "RTN","SAMIHOM3",46,0) ; web services get vapals & post vapals "RTN","SAMIHOM3",47,0) ; "RTN","SAMIHOM3",48,0) ; WSHOME wsi WSHOME^SAMIHOM3, get vapals (SAMI homepage) "RTN","SAMIHOM3",49,0) ; WSVAPALS wsi WSVAPALS^SAMIHOM3, post vapals (main gateway) "RTN","SAMIHOM3",50,0) ; "RTN","SAMIHOM3",51,0) ; web pages & web routes "RTN","SAMIHOM3",52,0) ; "RTN","SAMIHOM3",53,0) ; DEVHOME wpi DEVHOME^SAMIHOM3, development home page "RTN","SAMIHOM3",54,0) ; GETHOME wpi GETHOME^SAMIHOM3, get homepage (not subsequent visit) "RTN","SAMIHOM3",55,0) ; WSNEWCAS wri WSNEWCAS^SAMIHOM3, newcase (creates new case) "RTN","SAMIHOM3",56,0) ; "RTN","SAMIHOM3",57,0) ; private program interfaces "RTN","SAMIHOM3",58,0) ; "RTN","SAMIHOM3",59,0) ; $$SID2NUM number part of studyid (XXX0001 -> 1) "RTN","SAMIHOM3",60,0) ; $$GENSTDID studyID for number "RTN","SAMIHOM3",61,0) ; $$PREFIX letters to use to begin studyId "RTN","SAMIHOM3",62,0) ; $$KEYDATE date in StudyId format (yyyy-mm-dd) "RTN","SAMIHOM3",63,0) ; PREFILL prefill fields for forms "RTN","SAMIHOM3",64,0) ; "RTN","SAMIHOM3",65,0) ; private subroutines "RTN","SAMIHOM3",66,0) ; "RTN","SAMIHOM3",67,0) ; PATLIST returns a list of patients in ary, passed by name "RTN","SAMIHOM3",68,0) ; MKSIFORM create intake form "RTN","SAMIHOM3",69,0) ; "RTN","SAMIHOM3",70,0) ; unused &/or deprecated subroutines "RTN","SAMIHOM3",71,0) ; "RTN","SAMIHOM3",72,0) ; $$SCANFOR scan array looking for value, return index "RTN","SAMIHOM3",73,0) ; $$NEXTNUM next number for studyid "RTN","SAMIHOM3",74,0) ; $$VALDTNM validate a new name "RTN","SAMIHOM3",75,0) ; MKSBFORM create background form "RTN","SAMIHOM3",76,0) ; ADDPAT-INDEX calls newCase to add patient dfn to vapals "RTN","SAMIHOM3",77,0) ; "RTN","SAMIHOM3",78,0) ; "RTN","SAMIHOM3",79,0) ; "RTN","SAMIHOM3",80,0) ;@section 1 web services get vapals & post vapals "RTN","SAMIHOM3",81,0) ; "RTN","SAMIHOM3",82,0) ; "RTN","SAMIHOM3",83,0) ; "RTN","SAMIHOM3",84,0) ;@wsi WSHOME^SAMIHOM3, web service get vapals (SAMI homepage) "RTN","SAMIHOM3",85,0) WSHOME(SAMIRTN,SAMIFILTER) goto WSHOME^SAMIHOM4 "RTN","SAMIHOM3",86,0) ; "RTN","SAMIHOM3",87,0) ; "RTN","SAMIHOM3",88,0) ; "RTN","SAMIHOM3",89,0) ;@wsi WSVAPALS^SAMIHOM3, web service post vapals (main gateway) "RTN","SAMIHOM3",90,0) WSVAPALS(SAMIARG,SAMIBODY,SAMIRESULT) goto WSVAPALS^SAMIHOM4 "RTN","SAMIHOM3",91,0) ; (all calls come through this gateway) "RTN","SAMIHOM3",92,0) ; "RTN","SAMIHOM3",93,0) ; "RTN","SAMIHOM3",94,0) ; "RTN","SAMIHOM3",95,0) ;@section 2 web pages & web routes "RTN","SAMIHOM3",96,0) ; "RTN","SAMIHOM3",97,0) ; "RTN","SAMIHOM3",98,0) ; "RTN","SAMIHOM3",99,0) ;@wri WSNEWCAS^SAMIHOM3, newcase (creates new case) "RTN","SAMIHOM3",100,0) WSNEWCAS(SAMIARGS,SAMIBODY,SAMIRESULT) goto WSNEWCAS^SAMIHOM4 "RTN","SAMIHOM3",101,0) ; "RTN","SAMIHOM3",102,0) ; "RTN","SAMIHOM3",103,0) ; "RTN","SAMIHOM3",104,0) ;@wpi DEVHOME^SAMIHOM3, development home page "RTN","SAMIHOM3",105,0) DEVHOME(SAMIRTN,SAMIFILTER) goto DEVHOME^SAMIHOM4 "RTN","SAMIHOM3",106,0) ; "RTN","SAMIHOM3",107,0) ; "RTN","SAMIHOM3",108,0) ; "RTN","SAMIHOM3",109,0) ;@wpi GETHOME^SAMIHOM3, get homepage (not subsequent visit) "RTN","SAMIHOM3",110,0) GETHOME(SAMIRTN,SAMIFILTER) goto GETHOME^SAMIHOM4 "RTN","SAMIHOM3",111,0) ; "RTN","SAMIHOM3",112,0) ; "RTN","SAMIHOM3",113,0) ; "RTN","SAMIHOM3",114,0) ;@section 3 private program interfaces "RTN","SAMIHOM3",115,0) ; "RTN","SAMIHOM3",116,0) ; "RTN","SAMIHOM3",117,0) ; "RTN","SAMIHOM3",118,0) ;@API $$SID2NUM^SAMIHOM3, number part of study id "RTN","SAMIHOM3",119,0) SID2NUM(sid) ; number part of studyid (XXX0001 -> 1) "RTN","SAMIHOM3",120,0) ; "RTN","SAMIHOM3",121,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIHOM3",122,0) ; "RTN","SAMIHOM3",123,0) ;ven/gpl;public;function;clean;silent;sac;tests "RTN","SAMIHOM3",124,0) ;@called-by "RTN","SAMIHOM3",125,0) ; getVals^%wfhform "RTN","SAMIHOM3",126,0) ; WSCASE^SAMICASE "RTN","SAMIHOM3",127,0) ; WSNUFORM^SAMICASE "RTN","SAMIHOM3",128,0) ; MKBXFORM^SAMICAS3 "RTN","SAMIHOM3",129,0) ; MKCEFORM^SAMICAS3 "RTN","SAMIHOM3",130,0) ; MKFUFORM^SAMICAS3 "RTN","SAMIHOM3",131,0) ; MKITFORM^SAMICAS3 "RTN","SAMIHOM3",132,0) ; MKPTFORM^SAMICAS3 "RTN","SAMIHOM3",133,0) ; MKSBFORM^SAMICAS3 "RTN","SAMIHOM3",134,0) ; filename^SAMICTRT "RTN","SAMIHOM3",135,0) ; getVals^SAMIZ1 "RTN","SAMIHOM3",136,0) ;@calls "RTN","SAMIHOM3",137,0) ; $$setroot^%wd "RTN","SAMIHOM3",138,0) ;@input "RTN","SAMIHOM3",139,0) ; sid = study id "RTN","SAMIHOM3",140,0) ;@output = number from study id "RTN","SAMIHOM3",141,0) ;@examples [tbd] "RTN","SAMIHOM3",142,0) ;@tests [tbd] "RTN","SAMIHOM3",143,0) ; "RTN","SAMIHOM3",144,0) ;@stanza 2 calculate number "RTN","SAMIHOM3",145,0) ; "RTN","SAMIHOM3",146,0) ;new number set number=+$extract(sid,4,$length(sid)) "RTN","SAMIHOM3",147,0) ; we have to look up the number (pien) instead of computing it "RTN","SAMIHOM3",148,0) new proot set proot=$$setroot^%wd("vapals-patients") "RTN","SAMIHOM3",149,0) new number set number=$order(@proot@("sid",sid,"")) "RTN","SAMIHOM3",150,0) ; "RTN","SAMIHOM3",151,0) ;@stanza 3 return & termination "RTN","SAMIHOM3",152,0) ; "RTN","SAMIHOM3",153,0) quit number ; return number; end of $$sid2num "RTN","SAMIHOM3",154,0) ; "RTN","SAMIHOM3",155,0) ; "RTN","SAMIHOM3",156,0) ; "RTN","SAMIHOM3",157,0) GENSTDID(num,ARG) ; studyID for number "RTN","SAMIHOM3",158,0) ; "RTN","SAMIHOM3",159,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIHOM3",160,0) ; "RTN","SAMIHOM3",161,0) ;ven/gpl;private;function;clean;silent;sac;tests "RTN","SAMIHOM3",162,0) ;@called-by "RTN","SAMIHOM3",163,0) ; WSNEWCAS "RTN","SAMIHOM3",164,0) ; WSSBFORM^SAMIFWS "RTN","SAMIHOM3",165,0) ; WSSIFORM^SAMIFWS "RTN","SAMIHOM3",166,0) ; WSCEFORM^SAMIFWS "RTN","SAMIHOM3",167,0) ; MOV^SAMIMOV "RTN","SAMIHOM3",168,0) ; WSLOOKUP^SAMISRCH "RTN","SAMIHOM3",169,0) ;@calls none "RTN","SAMIHOM3",170,0) ; $$GETPRFX^SAMIFORM [commented out] "RTN","SAMIHOM3",171,0) ;@input "RTN","SAMIHOM3",172,0) ; num = number of study id "RTN","SAMIHOM3",173,0) ;@output = study id corresponding to number "RTN","SAMIHOM3",174,0) ;@examples [tbd] "RTN","SAMIHOM3",175,0) ;@tests "RTN","SAMIHOM3",176,0) ; UTSTDID^SAMIUTH3 "RTN","SAMIHOM3",177,0) ; "RTN","SAMIHOM3",178,0) ; "RTN","SAMIHOM3",179,0) ;@stanza 2 calculate study id "RTN","SAMIHOM3",180,0) ; "RTN","SAMIHOM3",181,0) new zl set zl=$length(num) "RTN","SAMIHOM3",182,0) new zz set zz="00000" "RTN","SAMIHOM3",183,0) ; "RTN","SAMIHOM3",184,0) ; new studyid set studyid=$$GETPRFX^SAMIFORM(.ARG)_$extract(zz,1,5-zl)_num "RTN","SAMIHOM3",185,0) ; "RTN","SAMIHOM3",186,0) ; the prefix is determined by the site or siteid, which should be passed "RTN","SAMIHOM3",187,0) ; in ARG "RTN","SAMIHOM3",188,0) new tsite set tsite=$get(ARG("siteid")) "RTN","SAMIHOM3",189,0) if tsite="" set tsite=$get(ARG("site")) "RTN","SAMIHOM3",190,0) if tsite="" set tsite="UNK" "RTN","SAMIHOM3",191,0) new studyid set studyid=tsite_$extract(zz,1,5-zl)_num "RTN","SAMIHOM3",192,0) ; "RTN","SAMIHOM3",193,0) ; "RTN","SAMIHOM3",194,0) ;@stanza 3 return & termination "RTN","SAMIHOM3",195,0) ; "RTN","SAMIHOM3",196,0) quit studyid ; return study id; end of $$GENSTDID "RTN","SAMIHOM3",197,0) ; "RTN","SAMIHOM3",198,0) ; "RTN","SAMIHOM3",199,0) ; "RTN","SAMIHOM3",200,0) KEYDATE(fmdt) ; date in StudyId format (yyyy-mm-dd) "RTN","SAMIHOM3",201,0) ; "RTN","SAMIHOM3",202,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIHOM3",203,0) ; "RTN","SAMIHOM3",204,0) ;ven/gpl;private;function;clean;silent;sac;tests "RTN","SAMIHOM3",205,0) ;@called-by "RTN","SAMIHOM3",206,0) ; WSNEWCAS "RTN","SAMIHOM3",207,0) ; WSNFPOST^SAMICASE "RTN","SAMIHOM3",208,0) ; SAVFILTR^SAMISAV "RTN","SAMIHOM3",209,0) ;@calls "RTN","SAMIHOM3",210,0) ; $$FMTE^XLFDT "RTN","SAMIHOM3",211,0) ;@input "RTN","SAMIHOM3",212,0) ; fmdt = date in fileman format "RTN","SAMIHOM3",213,0) ;@output = date in study id format "RTN","SAMIHOM3",214,0) ;@examples [tbd] "RTN","SAMIHOM3",215,0) ;@tests "RTN","SAMIHOM3",216,0) ; UTKEYDT^SAMIUTH3 "RTN","SAMIHOM3",217,0) ; "RTN","SAMIHOM3",218,0) ; "RTN","SAMIHOM3",219,0) ;@stanza 2 calculate studyid format "RTN","SAMIHOM3",220,0) ; "RTN","SAMIHOM3",221,0) new zdt set zdt=$$FMTE^XLFDT(fmdt,"7D") "RTN","SAMIHOM3",222,0) ; "RTN","SAMIHOM3",223,0) new zy set zy=$piece(zdt,"/",1) ; year "RTN","SAMIHOM3",224,0) new zm set zm=$piece(zdt,"/",2) ; month "RTN","SAMIHOM3",225,0) if $length(zm)=1 set zm="0"_zm "RTN","SAMIHOM3",226,0) ; "RTN","SAMIHOM3",227,0) new zd set zd=$piece(zdt,"/",3) ; day "RTN","SAMIHOM3",228,0) if $length(zd)=1 set zd="0"_zd "RTN","SAMIHOM3",229,0) ; "RTN","SAMIHOM3",230,0) new studydate set studydate=zy_"-"_zm_"-"_zd "RTN","SAMIHOM3",231,0) ; "RTN","SAMIHOM3",232,0) ; "RTN","SAMIHOM3",233,0) ;@stanza 3 return & termination "RTN","SAMIHOM3",234,0) ; "RTN","SAMIHOM3",235,0) quit studydate ; return date; end of $$KEYDATE "RTN","SAMIHOM3",236,0) ; "RTN","SAMIHOM3",237,0) ; "RTN","SAMIHOM3",238,0) ; "RTN","SAMIHOM3",239,0) PREFILL(dfn) ; prefill fields for form "RTN","SAMIHOM3",240,0) ; "RTN","SAMIHOM3",241,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIHOM3",242,0) ; "RTN","SAMIHOM3",243,0) ;ven/gpl;private;procedure;clean;silent;sac;tests "RTN","SAMIHOM3",244,0) ;@called-by "RTN","SAMIHOM3",245,0) ; WSNEWCAS "RTN","SAMIHOM3",246,0) ; GETHDR^SAMIFLD "RTN","SAMIHOM3",247,0) ;@calls "RTN","SAMIHOM3",248,0) ; PTINFO^SAMIVSTA "RTN","SAMIHOM3",249,0) ; $$setroot^%wd "RTN","SAMIHOM3",250,0) ; ^%DT "RTN","SAMIHOM3",251,0) ;@input "RTN","SAMIHOM3",252,0) ; dfn = patient ien "RTN","SAMIHOM3",253,0) ;@output "RTN","SAMIHOM3",254,0) ; @root(gien) = ... "RTN","SAMIHOM3",255,0) ; where root = graph root for elcap patients "RTN","SAMIHOM3",256,0) ;@examples [tbd] "RTN","SAMIHOM3",257,0) ;@tests [tbd] "RTN","SAMIHOM3",258,0) ; "RTN","SAMIHOM3",259,0) ; "RTN","SAMIHOM3",260,0) ;@stanza 2 prefill fields "RTN","SAMIHOM3",261,0) ; "RTN","SAMIHOM3",262,0) ; pull data from VistA "RTN","SAMIHOM3",263,0) ; "RTN","SAMIHOM3",264,0) ; new ok set ok=$$PTINFO^SAMIVSTA(dfn) "RTN","SAMIHOM3",265,0) ; if +ok<1 do ^%ZTER "RTN","SAMIHOM3",266,0) ; "RTN","SAMIHOM3",267,0) do PTINFO^SAMIVSTA(dfn) ; get additional info on patient "RTN","SAMIHOM3",268,0) ; "RTN","SAMIHOM3",269,0) ; prefills fields from patient-lookup graph "RTN","SAMIHOM3",270,0) ; "RTN","SAMIHOM3",271,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIHOM3",272,0) new lroot set lroot=$$setroot^%wd("patient-lookup") "RTN","SAMIHOM3",273,0) ; "RTN","SAMIHOM3",274,0) new lien set lien=$order(@lroot@("dfn",dfn,"")) "RTN","SAMIHOM3",275,0) quit:lien="" "RTN","SAMIHOM3",276,0) ; "RTN","SAMIHOM3",277,0) new gien set gien=$order(@root@("dfn",dfn,"")) ; "RTN","SAMIHOM3",278,0) quit:gien="" "RTN","SAMIHOM3",279,0) ; "RTN","SAMIHOM3",280,0) ; merge prefill fields "RTN","SAMIHOM3",281,0) merge @root@(gien)=@lroot@(lien) "RTN","SAMIHOM3",282,0) ; "RTN","SAMIHOM3",283,0) ; fix format problems "RTN","SAMIHOM3",284,0) new saminame set saminame=$get(@root@(gien,"saminame")) "RTN","SAMIHOM3",285,0) ; "RTN","SAMIHOM3",286,0) ; dob format "RTN","SAMIHOM3",287,0) new dob set dob=$get(@lroot@(lien,"sbdob")) "RTN","SAMIHOM3",288,0) new X set X=dob "RTN","SAMIHOM3",289,0) new Y "RTN","SAMIHOM3",290,0) do ^%DT ; convert date to fileman format "RTN","SAMIHOM3",291,0) quit:Y=-1 "RTN","SAMIHOM3",292,0) set dob=Y "RTN","SAMIHOM3",293,0) if dob'="" set @root@(gien,"sbdob")=$$VAPALSDT^SAMICASE(dob) "RTN","SAMIHOM3",294,0) if dob'="" set @root@(gien,"sidob")=$$VAPALSDT^SAMICASE(dob) "RTN","SAMIHOM3",295,0) ; "RTN","SAMIHOM3",296,0) ; ssn format "RTN","SAMIHOM3",297,0) new ssn set ssn=$get(@lroot@(lien,"ssn")) "RTN","SAMIHOM3",298,0) if $length(ssn)=9 set @root@(gien,"sissn")=$extract(ssn,1,3)_"-"_$extract(ssn,4,5)_"-"_$extract(ssn,6,9) "RTN","SAMIHOM3",299,0) ; "RTN","SAMIHOM3",300,0) ; studyid "RTN","SAMIHOM3",301,0) set @root@(gien,"sisid")=@root@(gien,"samistudyid") "RTN","SAMIHOM3",302,0) ; "RTN","SAMIHOM3",303,0) ; "RTN","SAMIHOM3",304,0) ;@stanza 3 termination "RTN","SAMIHOM3",305,0) ; "RTN","SAMIHOM3",306,0) quit ; end of PREFILL "RTN","SAMIHOM3",307,0) ; "RTN","SAMIHOM3",308,0) ; "RTN","SAMIHOM3",309,0) ; "RTN","SAMIHOM3",310,0) ;@section 4 private subroutines "RTN","SAMIHOM3",311,0) ; "RTN","SAMIHOM3",312,0) ; "RTN","SAMIHOM3",313,0) ; "RTN","SAMIHOM3",314,0) PATLIST(ARY) ; returns a list of patients in ary, passed by name "RTN","SAMIHOM3",315,0) ; "RTN","SAMIHOM3",316,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIHOM3",317,0) ; "RTN","SAMIHOM3",318,0) ;ven/gpl;private;procedure;clean;silent;sac;tests "RTN","SAMIHOM3",319,0) ;@called-by "RTN","SAMIHOM3",320,0) ; DEVHOME "RTN","SAMIHOM3",321,0) ;@calls "RTN","SAMIHOM3",322,0) ; $$setroot^%wd "RTN","SAMIHOM3",323,0) ;@input "RTN","SAMIHOM3",324,0) ; ARY = name of array to return patient list in "RTN","SAMIHOM3",325,0) ;@output "RTN","SAMIHOM3",326,0) ; @ary = array containing list of patients "RTN","SAMIHOM3",327,0) ;@examples [tbd] "RTN","SAMIHOM3",328,0) ;@tests "RTN","SAMIHOM3",329,0) ; UTPTLST^SAMIUTH3 "RTN","SAMIHOM3",330,0) ; "RTN","SAMIHOM3",331,0) ; "RTN","SAMIHOM3",332,0) ;@stanza 2 build list of patients "RTN","SAMIHOM3",333,0) ; "RTN","SAMIHOM3",334,0) new GROOT set GROOT=$$setroot^%wd("vapals-patients") "RTN","SAMIHOM3",335,0) ; "RTN","SAMIHOM3",336,0) kill @ARY "RTN","SAMIHOM3",337,0) new zi set zi="" "RTN","SAMIHOM3",338,0) for do quit:zi="" "RTN","SAMIHOM3",339,0) . set zi=$order(@GROOT@("graph",zi)) "RTN","SAMIHOM3",340,0) . quit:zi="" "RTN","SAMIHOM3",341,0) . set @ARY@(zi)="" "RTN","SAMIHOM3",342,0) . quit "RTN","SAMIHOM3",343,0) ; "RTN","SAMIHOM3",344,0) ; "RTN","SAMIHOM3",345,0) ;@stanza 3 termination "RTN","SAMIHOM3",346,0) ; "RTN","SAMIHOM3",347,0) quit ; end of PATLIST "RTN","SAMIHOM3",348,0) ; "RTN","SAMIHOM3",349,0) ; "RTN","SAMIHOM3",350,0) ; "RTN","SAMIHOM3",351,0) MKSIFORM(num) ; create intake form "RTN","SAMIHOM3",352,0) ; "RTN","SAMIHOM3",353,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIHOM3",354,0) ; "RTN","SAMIHOM3",355,0) ;ven/gpl;private;procedure;clean;silent;sac;tests "RTN","SAMIHOM3",356,0) ;@called-by "RTN","SAMIHOM3",357,0) ; WSNEWCAS "RTN","SAMIHOM3",358,0) ;@calls "RTN","SAMIHOM3",359,0) ; $$setroot^%wd "RTN","SAMIHOM3",360,0) ; SSAMISTA^SAMICASE "RTN","SAMIHOM3",361,0) ; $$URBRUR^SAMIVSTA "RTN","SAMIHOM3",362,0) ; $$NOW^XLFDT "RTN","SAMIHOM3",363,0) ; $$VAPALSDT^SAMICASE "RTN","SAMIHOM3",364,0) ;@input "RTN","SAMIHOM3",365,0) ; num = index where new form should be built "RTN","SAMIHOM3",366,0) ;@output "RTN","SAMIHOM3",367,0) ; @root(num) = ... "RTN","SAMIHOM3",368,0) ; where root = graph root for elcap patients "RTN","SAMIHOM3",369,0) ; @root@("graph") "RTN","SAMIHOM3",370,0) ;@examples [tbd] "RTN","SAMIHOM3",371,0) ;@tests "RTN","SAMIHOM3",372,0) ; UTSIFRM^SAMIUTH3 "RTN","SAMIHOM3",373,0) ; "RTN","SAMIHOM3",374,0) ; "RTN","SAMIHOM3",375,0) ;@stanza 2 create & place graph for new intake form "RTN","SAMIHOM3",376,0) ; "RTN","SAMIHOM3",377,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIHOM3",378,0) new sid set sid=$get(@root@(num,"samistudyid")) "RTN","SAMIHOM3",379,0) quit:sid="" "RTN","SAMIHOM3",380,0) ; "RTN","SAMIHOM3",381,0) new cdate set cdate=$get(@root@(num,"samicreatedate")) "RTN","SAMIHOM3",382,0) quit:cdate="" "RTN","SAMIHOM3",383,0) ; "RTN","SAMIHOM3",384,0) merge @root@("graph",sid,"siform-"_cdate)=@root@(num) "RTN","SAMIHOM3",385,0) ; "RTN","SAMIHOM3",386,0) ; update form samistatus to complete "RTN","SAMIHOM3",387,0) do SSAMISTA^SAMICASE(sid,"siform-"_cdate,"complete") "RTN","SAMIHOM3",388,0) ; "RTN","SAMIHOM3",389,0) ; "RTN","SAMIHOM3",390,0) ;@stanza 3 init new intake form from vista data "RTN","SAMIHOM3",391,0) ; "RTN","SAMIHOM3",392,0) new zf set zf=$name(@root@("graph",sid,"siform-"_cdate)) "RTN","SAMIHOM3",393,0) set @zf@("sipsa")=$get(@root@(num,"address1")) ; primary address "RTN","SAMIHOM3",394,0) set @zf@("sipan")=$get(@root@(num,"address2")) ; apartment # "RTN","SAMIHOM3",395,0) set @zf@("sipc")=$get(@root@(num,"city")) ; city "RTN","SAMIHOM3",396,0) set @zf@("sips")=$get(@root@(num,"state")) ; state "RTN","SAMIHOM3",397,0) set @zf@("sipcn")=$get(@root@(num,"county")) ; county "RTN","SAMIHOM3",398,0) set @zf@("sipcr")="USA" ; country "RTN","SAMIHOM3",399,0) ; "RTN","SAMIHOM3",400,0) set @zf@("sipz")=$get(@root@(num,"zip")) ; zip "RTN","SAMIHOM3",401,0) if @zf@("sipz")'="" do "RTN","SAMIHOM3",402,0) . new zip set zip=@zf@("sipz") "RTN","SAMIHOM3",403,0) . quit:zip="" "RTN","SAMIHOM3",404,0) . ; "RTN","SAMIHOM3",405,0) . new ru set ru=$$URBRUR^SAMIVSTA(zip) ; urban/rural from zip "RTN","SAMIHOM3",406,0) . if ru=0 set ru="n" "RTN","SAMIHOM3",407,0) . if ru="r"!(ru="u")!(ru="n") set @zf@("sirs")=ru "RTN","SAMIHOM3",408,0) . set @root@(num,"sirs")=$get(@zf@("sirs")) "RTN","SAMIHOM3",409,0) . quit "RTN","SAMIHOM3",410,0) ; "RTN","SAMIHOM3",411,0) new phn set phn=$get(@root@(num,"phone")) ; phone # "RTN","SAMIHOM3",412,0) if phn["x" set phn=$piece(phn," x",1) "RTN","SAMIHOM3",413,0) set @zf@("sippn")=phn "RTN","SAMIHOM3",414,0) ; "RTN","SAMIHOM3",415,0) set @zf@("sidc")=$$VAPALSDT^SAMICASE($$NOW^XLFDT) ; intake discussion "RTN","SAMIHOM3",416,0) set @zf@("sipedc")=$$VAPALSDT^SAMICASE($$NOW^XLFDT) ; pre-enroll disc "RTN","SAMIHOM3",417,0) ; set samifirsttime variable for intake form "RTN","SAMIHOM3",418,0) set @zf@("samifirsttime")="true" "RTN","SAMIHOM3",419,0) ; "RTN","SAMIHOM3",420,0) ; "RTN","SAMIHOM3",421,0) ;@stanza 3 termination "RTN","SAMIHOM3",422,0) ; "RTN","SAMIHOM3",423,0) quit "siform-"_cdate ; end of MKSIFORM "RTN","SAMIHOM3",424,0) ; "RTN","SAMIHOM3",425,0) ; "RTN","SAMIHOM3",426,0) ; "RTN","SAMIHOM3",427,0) ;@section 5 unused &/or deprecated subroutines "RTN","SAMIHOM3",428,0) ; "RTN","SAMIHOM3",429,0) ; "RTN","SAMIHOM3",430,0) ; "RTN","SAMIHOM3",431,0) SCANFOR(ary,start,what) ; scan array looking for value "RTN","SAMIHOM3",432,0) ; "RTN","SAMIHOM3",433,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIHOM3",434,0) ; "RTN","SAMIHOM3",435,0) ;ven/gpl;private;function;clean;silent;sac;tests "RTN","SAMIHOM3",436,0) ;@called-by none "RTN","SAMIHOM3",437,0) ;@calls: none "RTN","SAMIHOM3",438,0) ;@input "RTN","SAMIHOM3",439,0) ; .ary = array to scan "RTN","SAMIHOM3",440,0) ; start = index to begin scanning at "RTN","SAMIHOM3",441,0) ; what = value to scan array for "RTN","SAMIHOM3",442,0) ;@output = array index where value was found "RTN","SAMIHOM3",443,0) ;@examples [tbd] "RTN","SAMIHOM3",444,0) ;@tests "RTN","SAMIHOM3",445,0) ; UTSCAN4^SAMIUTH3 "RTN","SAMIHOM3",446,0) ; "RTN","SAMIHOM3",447,0) ; "RTN","SAMIHOM3",448,0) ;@stanza 2 scan array "RTN","SAMIHOM3",449,0) ; "RTN","SAMIHOM3",450,0) new %1 set %1=start "RTN","SAMIHOM3",451,0) new limit "RTN","SAMIHOM3",452,0) for limit=0:1:1001 do quit:'%1 quit:ary(%1)[what "RTN","SAMIHOM3",453,0) . set %1=$order(ary(%1)) "RTN","SAMIHOM3",454,0) . quit:'%1 "RTN","SAMIHOM3",455,0) . quit:ary(%1)[what "RTN","SAMIHOM3",456,0) . ; write !,ary(%1) "RTN","SAMIHOM3",457,0) . quit "RTN","SAMIHOM3",458,0) ; "RTN","SAMIHOM3",459,0) new zrtn set zrtn=%1 "RTN","SAMIHOM3",460,0) if %1<start set zrtn=start "RTN","SAMIHOM3",461,0) if %1>1000 set zrtn=start "RTN","SAMIHOM3",462,0) ; "RTN","SAMIHOM3",463,0) ; "RTN","SAMIHOM3",464,0) ;@stanza 3 return & termination "RTN","SAMIHOM3",465,0) ; "RTN","SAMIHOM3",466,0) quit zrtn ; return array index; end of $$$SCANFOR "RTN","SAMIHOM3",467,0) ; "RTN","SAMIHOM3",468,0) ; "RTN","SAMIHOM3",469,0) ; "RTN","SAMIHOM3",470,0) NEXTNUM() ; next number for studyid "RTN","SAMIHOM3",471,0) ; "RTN","SAMIHOM3",472,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIHOM3",473,0) ; "RTN","SAMIHOM3",474,0) ;ven/gpl;private;variable;clean;silent;sac;tests "RTN","SAMIHOM3",475,0) ;@called-by none "RTN","SAMIHOM3",476,0) ; WSNEWCAS [commented out] "RTN","SAMIHOM3",477,0) ;@calls "RTN","SAMIHOM3",478,0) ; $$setroot^%wd "RTN","SAMIHOM3",479,0) ;@input: none "RTN","SAMIHOM3",480,0) ;@output = next number for study id "RTN","SAMIHOM3",481,0) ;@examples [tbd] "RTN","SAMIHOM3",482,0) ;@tests "RTN","SAMIHOM3",483,0) ; UTNXTN^SAMIUTH3 "RTN","SAMIHOM3",484,0) ; "RTN","SAMIHOM3",485,0) ; "RTN","SAMIHOM3",486,0) ;@stanza 2 calculate next number "RTN","SAMIHOM3",487,0) ; "RTN","SAMIHOM3",488,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIHOM3",489,0) new number set number=$order(@root@(" "),-1)+1 "RTN","SAMIHOM3",490,0) ; "RTN","SAMIHOM3",491,0) ; "RTN","SAMIHOM3",492,0) ;@stanza 3 return & termination "RTN","SAMIHOM3",493,0) ; "RTN","SAMIHOM3",494,0) quit number ; return #; end of $$NEXTNUM "RTN","SAMIHOM3",495,0) ; "RTN","SAMIHOM3",496,0) ; "RTN","SAMIHOM3",497,0) ; "RTN","SAMIHOM3",498,0) VALDTNM(nm,args) ; validate new name "RTN","SAMIHOM3",499,0) ; "RTN","SAMIHOM3",500,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIHOM3",501,0) ; "RTN","SAMIHOM3",502,0) ;ven/gpl;private;function;clean;silent;sac;tests "RTN","SAMIHOM3",503,0) ;@called-by none "RTN","SAMIHOM3",504,0) ; WSNEWCAS [commented out] "RTN","SAMIHOM3",505,0) ;@calls none "RTN","SAMIHOM3",506,0) ;@input "RTN","SAMIHOM3",507,0) ; nm = name to validate "RTN","SAMIHOM3",508,0) ; .args = array to return error messages "RTN","SAMIHOM3",509,0) ;@output = 1 if valid, -1 if not "RTN","SAMIHOM3",510,0) ;@examples [tbd] "RTN","SAMIHOM3",511,0) ;@tests "RTN","SAMIHOM3",512,0) ; UTVALNM^SAMIUTH3 "RTN","SAMIHOM3",513,0) ; "RTN","SAMIHOM3",514,0) ; "RTN","SAMIHOM3",515,0) ;@stanza 2 screen for invalid name "RTN","SAMIHOM3",516,0) ; "RTN","SAMIHOM3",517,0) if nm'["," do quit -1 "RTN","SAMIHOM3",518,0) . set args("saminuerror")="invalid name" "RTN","SAMIHOM3",519,0) . quit "RTN","SAMIHOM3",520,0) ; "RTN","SAMIHOM3",521,0) ; "RTN","SAMIHOM3",522,0) ;@stanza 3 return & termination "RTN","SAMIHOM3",523,0) ; "RTN","SAMIHOM3",524,0) quit 1 ; return success; end of $$VALDTNM "RTN","SAMIHOM3",525,0) ; "RTN","SAMIHOM3",526,0) ; "RTN","SAMIHOM3",527,0) ; "RTN","SAMIHOM3",528,0) MKSBFORM(num) ; create background form [deprecated] "RTN","SAMIHOM3",529,0) ; "RTN","SAMIHOM3",530,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIHOM3",531,0) ; "RTN","SAMIHOM3",532,0) ;ven/gpl;private;procedure;clean;silent;sac;tests "RTN","SAMIHOM3",533,0) ;@called-by none "RTN","SAMIHOM3",534,0) ; WSNEWCAS [commented out by gpl 2018-06-15] "RTN","SAMIHOM3",535,0) ;@calls "RTN","SAMIHOM3",536,0) ; $$setroot^%wd "RTN","SAMIHOM3",537,0) ; SSAMISTA^SAMICASE "RTN","SAMIHOM3",538,0) ;@input "RTN","SAMIHOM3",539,0) ; num = index where new form should be built "RTN","SAMIHOM3",540,0) ;@output "RTN","SAMIHOM3",541,0) ; @root(num) = ... "RTN","SAMIHOM3",542,0) ; where root = graph root for elcap patients "RTN","SAMIHOM3",543,0) ; @root@("graph") "RTN","SAMIHOM3",544,0) ;@examples [tbd] "RTN","SAMIHOM3",545,0) ;@tests "RTN","SAMIHOM3",546,0) ; UTSBFRM^SAMIUTH3 "RTN","SAMIHOM3",547,0) ; "RTN","SAMIHOM3",548,0) ; "RTN","SAMIHOM3",549,0) ;@stanza 2 build background form & place graph "RTN","SAMIHOM3",550,0) ; "RTN","SAMIHOM3",551,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIHOM3",552,0) new sid set sid=$get(@root@(num,"samistudyid")) "RTN","SAMIHOM3",553,0) quit:sid="" "RTN","SAMIHOM3",554,0) ; "RTN","SAMIHOM3",555,0) new cdate set cdate=$get(@root@(num,"samicreatedate")) "RTN","SAMIHOM3",556,0) quit:cdate="" "RTN","SAMIHOM3",557,0) ; "RTN","SAMIHOM3",558,0) merge @root@("graph",sid,"sbform-"_cdate)=@root@(num) "RTN","SAMIHOM3",559,0) ; "RTN","SAMIHOM3",560,0) ; update form samistatus to complete "RTN","SAMIHOM3",561,0) do SSAMISTA^SAMICASE(sid,"sbform-"_cdate,"incomplete") "RTN","SAMIHOM3",562,0) ; "RTN","SAMIHOM3",563,0) ; "RTN","SAMIHOM3",564,0) ;@stanza 3 termination "RTN","SAMIHOM3",565,0) ; "RTN","SAMIHOM3",566,0) quit ; end of MKSBFORM "RTN","SAMIHOM3",567,0) ; "RTN","SAMIHOM3",568,0) ; "RTN","SAMIHOM3",569,0) ; "RTN","SAMIHOM3",570,0) ADDPAT(dfn) ; calls newCase to add patient dfn to vapals "RTN","SAMIHOM3",571,0) ; "RTN","SAMIHOM3",572,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIHOM3",573,0) ; "RTN","SAMIHOM3",574,0) ;;private;procedure;clean;silent;sac;tests "RTN","SAMIHOM3",575,0) ;@called-by none "RTN","SAMIHOM3",576,0) ;@calls "RTN","SAMIHOM3",577,0) ; $$setroot^%wd "RTN","SAMIHOM3",578,0) ; WSNEWCAS "RTN","SAMIHOM3",579,0) ;@falls-thru-to "RTN","SAMIHOM3",580,0) ; INDEX "RTN","SAMIHOM3",581,0) ;@input "RTN","SAMIHOM3",582,0) ; dfn = patient ien "RTN","SAMIHOM3",583,0) ;@output "RTN","SAMIHOM3",584,0) ; new patient is added to vapals graphstore "RTN","SAMIHOM3",585,0) ;@tests "RTN","SAMIHOM3",586,0) ; UTADDPT^SAMIUTH3 "RTN","SAMIHOM3",587,0) ; "RTN","SAMIHOM3",588,0) ; "RTN","SAMIHOM3",589,0) ;@stanza 2 add patient to graphstore "RTN","SAMIHOM3",590,0) ; "RTN","SAMIHOM3",591,0) new lroot set lroot=$$setroot^%wd("patient-lookup") "RTN","SAMIHOM3",592,0) new lien set lien=$order(@lroot@("dfn",dfn,"")) "RTN","SAMIHOM3",593,0) quit:lien="" "RTN","SAMIHOM3",594,0) ; "RTN","SAMIHOM3",595,0) new name set name=$get(@lroot@(lien,"saminame")) "RTN","SAMIHOM3",596,0) quit:name="" "RTN","SAMIHOM3",597,0) ; "RTN","SAMIHOM3",598,0) new bdy set bdy(1)="saminame="_name_"&dfn="_dfn "RTN","SAMIHOM3",599,0) new ARGS,result "RTN","SAMIHOM3",600,0) ; "RTN","SAMIHOM3",601,0) do WSNEWCAS(.ARGS,.bdy,.result) ; add to graphstore "RTN","SAMIHOM3",602,0) ; zwrite result "RTN","SAMIHOM3",603,0) ; "RTN","SAMIHOM3",604,0) ; "RTN","SAMIHOM3",605,0) INDEX ;@stanza 3 reindex vapals-patients graph "RTN","SAMIHOM3",606,0) ; "RTN","SAMIHOM3",607,0) ;@falls-thru-from "RTN","SAMIHOM3",608,0) ; ADDPAT "RTN","SAMIHOM3",609,0) ; "RTN","SAMIHOM3",610,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIHOM3",611,0) ; "RTN","SAMIHOM3",612,0) new zi set zi=0 "RTN","SAMIHOM3",613,0) for do quit:+zi=0 "RTN","SAMIHOM3",614,0) . set zi=$order(@root@(zi)) "RTN","SAMIHOM3",615,0) . quit:+zi=0 "RTN","SAMIHOM3",616,0) . ; "RTN","SAMIHOM3",617,0) . new dfn set dfn=@root@(zi,"dfn") ; patient ien "RTN","SAMIHOM3",618,0) . new sid set sid=@root@(zi,"samistudyid") ; study id "RTN","SAMIHOM3",619,0) . set @root@("dfn",dfn,zi)="" ; patient ien index "RTN","SAMIHOM3",620,0) . set @root@("sid",sid,zi)="" ; study id index "RTN","SAMIHOM3",621,0) . quit "RTN","SAMIHOM3",622,0) ; "RTN","SAMIHOM3",623,0) ; "RTN","SAMIHOM3",624,0) ;@stanza 3 termination "RTN","SAMIHOM3",625,0) ; "RTN","SAMIHOM3",626,0) quit ; end of ADDPAT-INDEX "RTN","SAMIHOM3",627,0) ; "RTN","SAMIHOM3",628,0) ; "RTN","SAMIHOM3",629,0) ; "RTN","SAMIHOM3",630,0) EOR ; end of routine SAMIHOM3 "RTN","SAMIHOM4") 0^7^B899962251 "RTN","SAMIHOM4",1,0) SAMIHOM4 ;ven/gpl,arc - homepage web services ;2021-06-16t18:09z "RTN","SAMIHOM4",2,0) ;;18.0;SAMI;**1,4,5,6,9,12**;;Build 6 "RTN","SAMIHOM4",3,0) ;;1.18.0.12-t3+i12 "RTN","SAMIHOM4",4,0) ; "RTN","SAMIHOM4",5,0) ; SAMIHOM4 contains web services & other subroutines for producing "RTN","SAMIHOM4",6,0) ; the ELCAP Home Page. "RTN","SAMIHOM4",7,0) ; "RTN","SAMIHOM4",8,0) quit ; no entry from top "RTN","SAMIHOM4",9,0) ; "RTN","SAMIHOM4",10,0) ; "RTN","SAMIHOM4",11,0) ; "RTN","SAMIHOM4",12,0) ;@section 0 primary development "RTN","SAMIHOM4",13,0) ; "RTN","SAMIHOM4",14,0) ; "RTN","SAMIHOM4",15,0) ; "RTN","SAMIHOM4",16,0) ;@license see routine SAMIUL "RTN","SAMIHOM4",17,0) ;@documentation see SAMIHUL "RTN","SAMIHOM4",18,0) ;@contents "RTN","SAMIHOM4",19,0) ; "RTN","SAMIHOM4",20,0) ; web service get vapals & related subroutines "RTN","SAMIHOM4",21,0) ; "RTN","SAMIHOM4",22,0) ; WSHOME code for wsi WSHOME^SAMIHOM3 "RTN","SAMIHOM4",23,0) ; get vapals (vapals-elcap homepage) "RTN","SAMIHOM4",24,0) ; DEVHOME code for wpi DEVHOME^SAMIHOM3 "RTN","SAMIHOM4",25,0) ; development home page "RTN","SAMIHOM4",26,0) ; GETHOME code for wpi GETHOME^SAMIHOM3 "RTN","SAMIHOM4",27,0) ; get homepage (not subsequent visit) "RTN","SAMIHOM4",28,0) ; "RTN","SAMIHOM4",29,0) ; web service post vapals & related subroutines "RTN","SAMIHOM4",30,0) ; "RTN","SAMIHOM4",31,0) ; WSVAPALS code for wsi WSVAPALS^SAMIHOM3 "RTN","SAMIHOM4",32,0) ; post vapals (main gateway) "RTN","SAMIHOM4",33,0) ; "RTN","SAMIHOM4",34,0) ; other "RTN","SAMIHOM4",35,0) ; "RTN","SAMIHOM4",36,0) ; REG: manual registration "RTN","SAMIHOM4",37,0) ; MKPTLK: creates patient-lookup record "RTN","SAMIHOM4",38,0) ; UPDTFRMS: update demographics in all forms for patient "RTN","SAMIHOM4",39,0) ; MERGE: merge participant records "RTN","SAMIHOM4",40,0) ; ADDUNMAT: adds unmatched report web service to system "RTN","SAMIHOM4",41,0) ; DELUNMAT: deletes unmatched web service "RTN","SAMIHOM4",42,0) ; WSUNMAT: navigates to unmatched report "RTN","SAMIHOM4",43,0) ; $$DUPSSN = true if duplicate ssn "RTN","SAMIHOM4",44,0) ; $$DUPICN = true if duplicate icn "RTN","SAMIHOM4",45,0) ; $$BADICN = true if ICN checkdigits are wrong "RTN","SAMIHOM4",46,0) ; SAVE: save patient-lookup record after edit "RTN","SAMIHOM4",47,0) ; $$REMATCH = possible match ien "RTN","SAMIHOM4",48,0) ; SETINFO: set information message text "RTN","SAMIHOM4",49,0) ; SETWARN: set warning message text "RTN","SAMIHOM4",50,0) ; RTNERR: redisplay page w/error message "RTN","SAMIHOM4",51,0) ; RTNPAGE: display page "RTN","SAMIHOM4",52,0) ; REINDXPL: reindex patient lookup "RTN","SAMIHOM4",53,0) ; INDXPTLK: generate index entries in patient-lookup graph "RTN","SAMIHOM4",54,0) ; UNINDXPT: remove index entries from patient-lookup graph "RTN","SAMIHOM4",55,0) ; $$UCASE = uppercase "RTN","SAMIHOM4",56,0) ; WSNEWCAS code for wr newcase (creates new case) "RTN","SAMIHOM4",57,0) ; "RTN","SAMIHOM4",58,0) ;@to-do "RTN","SAMIHOM4",59,0) ; Add label comments "RTN","SAMIHOM4",60,0) ; "RTN","SAMIHOM4",61,0) ; "RTN","SAMIHOM4",62,0) ; "RTN","SAMIHOM4",63,0) ;@section 1 web service get vapals & related subroutines "RTN","SAMIHOM4",64,0) ; "RTN","SAMIHOM4",65,0) ; "RTN","SAMIHOM4",66,0) ; "RTN","SAMIHOM4",67,0) ;@wsi-code WSHOME^SAMIHOM3 "RTN","SAMIHOM4",68,0) WSHOME ; get vapals (vapals-elcap homepage) "RTN","SAMIHOM4",69,0) ; "RTN","SAMIHOM4",70,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIHOM4",71,0) ; "RTN","SAMIHOM4",72,0) ;ven/gpl;wsi;procedure;clean;silent;sac;tests "RTN","SAMIHOM4",73,0) ;@signature "RTN","SAMIHOM4",74,0) ; do WSHOME^SAMIHOM3(SAMIRTN,SAMIFILTER) "RTN","SAMIHOM4",75,0) ;@branches-from "RTN","SAMIHOM4",76,0) ; WSHOME^SAMIHOM3 "RTN","SAMIHOM4",77,0) ;@wsi-called-by "RTN","SAMIHOM4",78,0) ; web service get vapals "RTN","SAMIHOM4",79,0) ; WSVAPALS^SAMIHOM4 "RTN","SAMIHOM4",80,0) ; LOGIN^SAMISITE "RTN","SAMIHOM4",81,0) ;@called-by none "RTN","SAMIHOM4",82,0) ;@calls "RTN","SAMIHOM4",83,0) ; DEVHOME^SAMIHOM3 "RTN","SAMIHOM4",84,0) ; WSVAPALS^SAMIHOM3 "RTN","SAMIHOM4",85,0) ; GETHOME^SAMIHOM3 "RTN","SAMIHOM4",86,0) ;@input "RTN","SAMIHOM4",87,0) ; SAMIFILTER (no parameters required) "RTN","SAMIHOM4",88,0) ;@output "RTN","SAMIHOM4",89,0) ; .SAMIRTN "RTN","SAMIHOM4",90,0) ;@examples [tbd] "RTN","SAMIHOM4",91,0) ;@tests "RTN","SAMIHOM4",92,0) ; UTWSHM^SAMIUTH3 "RTN","SAMIHOM4",93,0) ; UTWSHM1^SAMIUTH3 "RTN","SAMIHOM4",94,0) ; UTWSHM2^SAMIUTH3 "RTN","SAMIHOM4",95,0) ; "RTN","SAMIHOM4",96,0) ; "RTN","SAMIHOM4",97,0) ;@stanza 2 route to appropriate homepage or bypass to other webpage "RTN","SAMIHOM4",98,0) ; "RTN","SAMIHOM4",99,0) ; present development homepage for testing "RTN","SAMIHOM4",100,0) if $get(SAMIFILTER("test"))=1 do quit "RTN","SAMIHOM4",101,0) . do DEVHOME^SAMIHOM3(.SAMIRTN,.SAMIFILTER) "RTN","SAMIHOM4",102,0) . quit "RTN","SAMIHOM4",103,0) ; "RTN","SAMIHOM4",104,0) ; bypass for get access to pages "RTN","SAMIHOM4",105,0) if $g(SAMIFILTER("samiroute"))'="" do quit "RTN","SAMIHOM4",106,0) . new SAMIBODY set SAMIBODY(1)="" "RTN","SAMIHOM4",107,0) . do WSVAPALS^SAMIHOM3(.SAMIFILTER,.SAMIBODY,.SAMIRTN) "RTN","SAMIHOM4",108,0) . quit "RTN","SAMIHOM4",109,0) ; "RTN","SAMIHOM4",110,0) ; V4W/DLW - bypass for get access from CPRS "RTN","SAMIHOM4",111,0) if $get(SAMIFILTER("dfn"))'="" do quit "RTN","SAMIHOM4",112,0) . new dfn set dfn=$get(SAMIFILTER("dfn")) "RTN","SAMIHOM4",113,0) . new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIHOM4",114,0) . new studyid set studyid=$get(@root@(dfn,"samistudyid")) "RTN","SAMIHOM4",115,0) . new SAMIBODY "RTN","SAMIHOM4",116,0) . if studyid'="" do "RTN","SAMIHOM4",117,0) . . set SAMIBODY(1)="samiroute=casereview&dfn="_dfn_"&studyid="_studyid "RTN","SAMIHOM4",118,0) . . quit "RTN","SAMIHOM4",119,0) . else do "RTN","SAMIHOM4",120,0) . . set SAMIBODY(1)="samiroute=lookup&dfn="_dfn_"&studyid="_studyid "RTN","SAMIHOM4",121,0) . . quit "RTN","SAMIHOM4",122,0) . do WSVAPALS^SAMIHOM3(.SAMIFILTER,.SAMIBODY,.SAMIRTN) "RTN","SAMIHOM4",123,0) . quit "RTN","SAMIHOM4",124,0) ; "RTN","SAMIHOM4",125,0) ; default to VAPALS homepage "RTN","SAMIHOM4",126,0) do GETHOME^SAMIHOM3(.SAMIRTN,.SAMIFILTER) "RTN","SAMIHOM4",127,0) ; "RTN","SAMIHOM4",128,0) ; "RTN","SAMIHOM4",129,0) ;@stanza 3 termination "RTN","SAMIHOM4",130,0) ; "RTN","SAMIHOM4",131,0) quit ; end of wsi WSHOME^SAMIHOM3 "RTN","SAMIHOM4",132,0) ; "RTN","SAMIHOM4",133,0) ; "RTN","SAMIHOM4",134,0) ; "RTN","SAMIHOM4",135,0) ;@wpi-code DEVHOME^SAMIHOM3 "RTN","SAMIHOM4",136,0) DEVHOME ; development home page "RTN","SAMIHOM4",137,0) ; "RTN","SAMIHOM4",138,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIHOM4",139,0) ; "RTN","SAMIHOM4",140,0) ;ven/gpl;wpi;procedure;clean;silent;sac;tests "RTN","SAMIHOM4",141,0) ;@signature "RTN","SAMIHOM4",142,0) ; do DEVHOME^SAMIHOM3(SAMIRTN,SAMIFILTER) "RTN","SAMIHOM4",143,0) ;@branches-from "RTN","SAMIHOM4",144,0) ; DEVHOME^SAMIHOM3 "RTN","SAMIHOM4",145,0) ;@wpi-called-by "RTN","SAMIHOM4",146,0) ; wsi WSHOME^SAMIHOM3 [web service get vapals] "RTN","SAMIHOM4",147,0) ;@called-by none "RTN","SAMIHOM4",148,0) ;@calls "RTN","SAMIHOM4",149,0) ; htmltb2^%yottaweb "RTN","SAMIHOM4",150,0) ; PATLIST^SAMIHOM3 "RTN","SAMIHOM4",151,0) ; genhtml^%yottautl "RTN","SAMIHOM4",152,0) ; addary^%yottautl "RTN","SAMIHOM4",153,0) ;@input "RTN","SAMIHOM4",154,0) ; SAMIFILTER = "RTN","SAMIHOM4",155,0) ;@output "RTN","SAMIHOM4",156,0) ;.SAMIRTN = "RTN","SAMIHOM4",157,0) ;@examples [tbd] "RTN","SAMIHOM4",158,0) ;@tests [tbd] "RTN","SAMIHOM4",159,0) ; "RTN","SAMIHOM4",160,0) ; "RTN","SAMIHOM4",161,0) ;@stanza 2 present development homepage "RTN","SAMIHOM4",162,0) ; "RTN","SAMIHOM4",163,0) new gtop,gbot "RTN","SAMIHOM4",164,0) do htmltb2^%yottaweb(.gtop,.gbot,"SAMI Test Patients") "RTN","SAMIHOM4",165,0) ; "RTN","SAMIHOM4",166,0) new html,ary,hpat "RTN","SAMIHOM4",167,0) do PATLIST^SAMIHOM3("hpat") "RTN","SAMIHOM4",168,0) quit:'$data(hpat) "RTN","SAMIHOM4",169,0) ; "RTN","SAMIHOM4",170,0) set ary("title")="SAMI Test Patients on this system" "RTN","SAMIHOM4",171,0) set ary("header",1)="StudyId" "RTN","SAMIHOM4",172,0) set ary("header",2)="Name" "RTN","SAMIHOM4",173,0) ; "RTN","SAMIHOM4",174,0) new cnt set cnt=0 "RTN","SAMIHOM4",175,0) new zi set zi="" "RTN","SAMIHOM4",176,0) for do quit:zi="" "RTN","SAMIHOM4",177,0) . set zi=$order(hpat(zi)) "RTN","SAMIHOM4",178,0) . quit:zi="" "RTN","SAMIHOM4",179,0) . ; "RTN","SAMIHOM4",180,0) . set cnt=cnt+1 "RTN","SAMIHOM4",181,0) . new url set url="<a href=""/cform.cgi?studyId="_zi_""">"_zi_"</a>" "RTN","SAMIHOM4",182,0) . set ary(cnt,1)=url "RTN","SAMIHOM4",183,0) . set ary(cnt,2)="" "RTN","SAMIHOM4",184,0) . quit "RTN","SAMIHOM4",185,0) ; "RTN","SAMIHOM4",186,0) do genhtml^%yottautl("html","ary") "RTN","SAMIHOM4",187,0) ; "RTN","SAMIHOM4",188,0) do addary^%yottautl("SAMIRTN","gtop") "RTN","SAMIHOM4",189,0) do addary^%yottautl("SAMIRTN","html") "RTN","SAMIHOM4",190,0) set SAMIRTN($order(SAMIRTN(""),-1)+1)=gbot "RTN","SAMIHOM4",191,0) kill SAMIRTN(0) "RTN","SAMIHOM4",192,0) ; "RTN","SAMIHOM4",193,0) set HTTPRSP("mime")="text/html" "RTN","SAMIHOM4",194,0) ; "RTN","SAMIHOM4",195,0) ; "RTN","SAMIHOM4",196,0) ;@stanza 3 termination "RTN","SAMIHOM4",197,0) ; "RTN","SAMIHOM4",198,0) quit ; end of wpi DEVHOME^SAMIHOM3 "RTN","SAMIHOM4",199,0) ; "RTN","SAMIHOM4",200,0) ; "RTN","SAMIHOM4",201,0) ; "RTN","SAMIHOM4",202,0) ;@wpi-code GETHOME^SAMIHOM3 "RTN","SAMIHOM4",203,0) GETHOME ; get homepage (not subsequent visit) "RTN","SAMIHOM4",204,0) ; "RTN","SAMIHOM4",205,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIHOM4",206,0) ; "RTN","SAMIHOM4",207,0) ;ven/gpl;wpi;procedure;clean;silent;sac;tests "RTN","SAMIHOM4",208,0) ;@signature "RTN","SAMIHOM4",209,0) ; do GETHOME^SAMIHOM3(SAMIRTN,SAMIFILTER) "RTN","SAMIHOM4",210,0) ;@branches-from "RTN","SAMIHOM4",211,0) ; GETHOME^SAMIHOM3 "RTN","SAMIHOM4",212,0) ;@wpi-called-by "RTN","SAMIHOM4",213,0) ; WSHOME "RTN","SAMIHOM4",214,0) ; WSVAPALS "RTN","SAMIHOM4",215,0) ; SAVE "RTN","SAMIHOM4",216,0) ; WSNEWCAS [commented out] "RTN","SAMIHOM4",217,0) ; WSNFPOST^SAMICAS3 "RTN","SAMIHOM4",218,0) ; WSLOOKUP^SAMISRC2 "RTN","SAMIHOM4",219,0) ; WSREPORT^SAMIUR "RTN","SAMIHOM4",220,0) ; WSREPORT^SAMIUR1 "RTN","SAMIHOM4",221,0) ;@called-by none "RTN","SAMIHOM4",222,0) ;@calls "RTN","SAMIHOM4",223,0) ; $$FINDSITE^SAMISITE "RTN","SAMIHOM4",224,0) ; GETTMPL^SAMICASE "RTN","SAMIHOM4",225,0) ; MERGEHTM^%wf "RTN","SAMIHOM4",226,0) ; ADDCRLF^VPRJRUT "RTN","SAMIHOM4",227,0) ;@input "RTN","SAMIHOM4",228,0) ; SAMIFILTER "RTN","SAMIHOM4",229,0) ;@output "RTN","SAMIHOM4",230,0) ; .SAMIRTN "RTN","SAMIHOM4",231,0) ;@examples [tbd] "RTN","SAMIHOM4",232,0) ;@tests "RTN","SAMIHOM4",233,0) ; UTGETHM^SAMIUTH3 "RTN","SAMIHOM4",234,0) ; UTSCAN4^SAMIUTH3 "RTN","SAMIHOM4",235,0) ; "RTN","SAMIHOM4",236,0) ; "RTN","SAMIHOM4",237,0) ;@stanza 2 get template for homepage "RTN","SAMIHOM4",238,0) ; "RTN","SAMIHOM4",239,0) ; Processing for multi-tenancy "RTN","SAMIHOM4",240,0) ; "RTN","SAMIHOM4",241,0) if $get(SAMIFILTER("siteid"))="" if '$$FINDSITE^SAMISITE(.SAMIRTN,.SAMIFILTER) quit 0 "RTN","SAMIHOM4",242,0) new SAMISITE,SAMITITL "RTN","SAMIHOM4",243,0) set SAMISITE=$get(SAMIFILTER("siteid")) "RTN","SAMIHOM4",244,0) set SAMITITL=$get(SAMIFILTER("sitetitle")) "RTN","SAMIHOM4",245,0) ; "RTN","SAMIHOM4",246,0) new temp,tout,form "RTN","SAMIHOM4",247,0) set form="vapals:home" "RTN","SAMIHOM4",248,0) do GETTMPL^SAMICASE("temp",form) "RTN","SAMIHOM4",249,0) quit:'$data(temp) "RTN","SAMIHOM4",250,0) ; "RTN","SAMIHOM4",251,0) ; "RTN","SAMIHOM4",252,0) ;@stanza 3 process homepage template "RTN","SAMIHOM4",253,0) ; "RTN","SAMIHOM4",254,0) new err "RTN","SAMIHOM4",255,0) do MERGEHTM^%wf(.temp,.SAMIFILTER,.err) "RTN","SAMIHOM4",256,0) ; "RTN","SAMIHOM4",257,0) do ADDCRLF^VPRJRUT(.temp) "RTN","SAMIHOM4",258,0) merge SAMIRTN=temp "RTN","SAMIHOM4",259,0) ; "RTN","SAMIHOM4",260,0) ; "RTN","SAMIHOM4",261,0) ;@stanza 4 termination "RTN","SAMIHOM4",262,0) ; "RTN","SAMIHOM4",263,0) quit ; end of wpi GETHOME^SAMIHOM3 "RTN","SAMIHOM4",264,0) ; "RTN","SAMIHOM4",265,0) ; "RTN","SAMIHOM4",266,0) ; "RTN","SAMIHOM4",267,0) ; below is redacted from GETHOME^SAMIHOM3 "RTN","SAMIHOM4",268,0) ; "RTN","SAMIHOM4",269,0) ;@old-calls "RTN","SAMIHOM4",270,0) ; FIXHREF^SAMIFORM "RTN","SAMIHOM4",271,0) ; FIXSRC^SAMIFORM "RTN","SAMIHOM4",272,0) ; $$GET^XPAR "RTN","SAMIHOM4",273,0) ; findReplace^%ts "RTN","SAMIHOM4",274,0) ; ADDCRLF^VPRJRUT "RTN","SAMIHOM4",275,0) ; "RTN","SAMIHOM4",276,0) new cnt set cnt=0 "RTN","SAMIHOM4",277,0) new zi set zi=0 "RTN","SAMIHOM4",278,0) for set zi=$order(temp(zi)) quit:+zi=0 do ; "RTN","SAMIHOM4",279,0) . ; "RTN","SAMIHOM4",280,0) . n ln s ln=temp(zi) "RTN","SAMIHOM4",281,0) . n touched s touched=0 "RTN","SAMIHOM4",282,0) . ; "RTN","SAMIHOM4",283,0) . i ln["href" i 'touched d ; "RTN","SAMIHOM4",284,0) . . d FIXHREF^SAMIFORM(.ln) "RTN","SAMIHOM4",285,0) . . s temp(zi)=ln "RTN","SAMIHOM4",286,0) . ; "RTN","SAMIHOM4",287,0) . i ln["src" d ; "RTN","SAMIHOM4",288,0) . . d FIXSRC^SAMIFORM(.ln) "RTN","SAMIHOM4",289,0) . . s temp(zi)=ln "RTN","SAMIHOM4",290,0) . ; "RTN","SAMIHOM4",291,0) . i ln["id" i ln["studyIdMenu" d ; "RTN","SAMIHOM4",292,0) . . s zi=zi+4 "RTN","SAMIHOM4",293,0) . ; "RTN","SAMIHOM4",294,0) . if ln["@@MANUALREGISTRATION@@" do ; turn off manual registration "RTN","SAMIHOM4",295,0) . . n setman,setparm "RTN","SAMIHOM4",296,0) . . s setman="true" "RTN","SAMIHOM4",297,0) . . s setparm=$$GET^XPAR("SYS","SAMI ALLOW MANUAL ENTRY",,"Q") "RTN","SAMIHOM4",298,0) . . i setparm=0 s setman="false" "RTN","SAMIHOM4",299,0) . . do findReplace^%ts(.ln,"@@MANUALREGISTRATION@@",setman) "RTN","SAMIHOM4",300,0) . . s temp(zi)=ln "RTN","SAMIHOM4",301,0) . . quit "RTN","SAMIHOM4",302,0) . set cnt=cnt+1 "RTN","SAMIHOM4",303,0) . set tout(cnt)=temp(zi) "RTN","SAMIHOM4",304,0) . quit "RTN","SAMIHOM4",305,0) ; "RTN","SAMIHOM4",306,0) ; "RTN","SAMIHOM4",307,0) ;@old-stanza 4 add cr/lf & save to return array "RTN","SAMIHOM4",308,0) ; "RTN","SAMIHOM4",309,0) do ADDCRLF^VPRJRUT(.tout) "RTN","SAMIHOM4",310,0) merge SAMIRTN=tout "RTN","SAMIHOM4",311,0) ; "RTN","SAMIHOM4",312,0) ; "RTN","SAMIHOM4",313,0) ;@old-stanza 5 termination "RTN","SAMIHOM4",314,0) ; "RTN","SAMIHOM4",315,0) quit ; old end of wpi GETHOME^SAMIHOM3 "RTN","SAMIHOM4",316,0) ; "RTN","SAMIHOM4",317,0) ; "RTN","SAMIHOM4",318,0) ; "RTN","SAMIHOM4",319,0) ;@section 2 web service post vapals & related subroutines "RTN","SAMIHOM4",320,0) ; "RTN","SAMIHOM4",321,0) ; "RTN","SAMIHOM4",322,0) ; "RTN","SAMIHOM4",323,0) ;@wsi-code WSVAPALS^SAMIHOM3 "RTN","SAMIHOM4",324,0) WSVAPALS ; post vapals (main gateway) "RTN","SAMIHOM4",325,0) ; "RTN","SAMIHOM4",326,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIHOM4",327,0) ; "RTN","SAMIHOM4",328,0) ;ven/gpl;wsi;procedure;clean;silent;sac;tests "RTN","SAMIHOM4",329,0) ;@signature "RTN","SAMIHOM4",330,0) ; do WSVAPALS^SAMIHOM3(SAMIARG,SAMIBODY,SAMIRESULT) "RTN","SAMIHOM4",331,0) ;@branches-from "RTN","SAMIHOM4",332,0) ; WSVAPALS^SAMIHOM3 "RTN","SAMIHOM4",333,0) ;@wsi-called-by "RTN","SAMIHOM4",334,0) ;@called-by "RTN","SAMIHOM4",335,0) ;@calls "RTN","SAMIHOM4",336,0) ;@input [tbd] "RTN","SAMIHOM4",337,0) ;@output [tbd] "RTN","SAMIHOM4",338,0) ;@examples [tbd] "RTN","SAMIHOM4",339,0) ;@tests [tbd] "RTN","SAMIHOM4",340,0) ; "RTN","SAMIHOM4",341,0) ; all calls come through this gateway "RTN","SAMIHOM4",342,0) ; "RTN","SAMIHOM4",343,0) k ^SAMIUL("vapals") "RTN","SAMIHOM4",344,0) m ^SAMIUL("vapals")=SAMIARG "RTN","SAMIHOM4",345,0) m ^SAMIUL("vapals","BODY")=SAMIBODY "RTN","SAMIHOM4",346,0) ; "RTN","SAMIHOM4",347,0) new vars,SAMIBDY "RTN","SAMIHOM4",348,0) set SAMIBDY=$get(SAMIBODY(1)) "RTN","SAMIHOM4",349,0) do parseBody^%wf("vars",.SAMIBDY) "RTN","SAMIHOM4",350,0) m vars=SAMIARG "RTN","SAMIHOM4",351,0) i $g(vars("siteid"))'="" d ; "RTN","SAMIHOM4",352,0) . i $g(vars("site"))'=$g(vars("siteid")) s vars("site")=$g(vars("siteid")) "RTN","SAMIHOM4",353,0) m SAMIARG=vars "RTN","SAMIHOM4",354,0) m SAMIARG=SAMIBODY "RTN","SAMIHOM4",355,0) ; "RTN","SAMIHOM4",356,0) ; Processing for multi-tenancy "RTN","SAMIHOM4",357,0) ; "RTN","SAMIHOM4",358,0) if '$d(vars("siteid")) d ; "RTN","SAMIHOM4",359,0) . if $g(vars("studyid"))="" q "RTN","SAMIHOM4",360,0) . n sym s sym=$e(vars("studyid"),1,3) ; first 3 chars in studyid "RTN","SAMIHOM4",361,0) . i $$SITENM2^SAMISITE(sym)=-1 q "RTN","SAMIHOM4",362,0) . s vars("siteid")=sym "RTN","SAMIHOM4",363,0) . s vars("site")=sym "RTN","SAMIHOM4",364,0) ; "RTN","SAMIHOM4",365,0) if $G(vars("site"))'="" d ; "RTN","SAMIHOM4",366,0) . n siteid s siteid=vars("site") "RTN","SAMIHOM4",367,0) . s SAMIARG("siteid")=siteid "RTN","SAMIHOM4",368,0) . s SAMIARG("sitetitle")=$$SITENM2^SAMISITE(siteid)_" - "_siteid "RTN","SAMIHOM4",369,0) k ^gpl("siteselect") "RTN","SAMIHOM4",370,0) m ^gpl("siteselect")=SAMIARG "RTN","SAMIHOM4",371,0) m ^gpl("siteselect","vars")=vars "RTN","SAMIHOM4",372,0) if $G(SAMIARG("siteid"))="" if '$$FINDSITE^SAMISITE(.SAMIRESULT,.SAMIARG) Q 0 "RTN","SAMIHOM4",373,0) new SAMISITE,SAMITITL "RTN","SAMIHOM4",374,0) s SAMISITE=$G(SAMIARG("siteid")) "RTN","SAMIHOM4",375,0) i $G(SAMIARG("sitetitle"))="" d ; "RTN","SAMIHOM4",376,0) . s SAMIARG("sitetitle")=$$SITENM2^SAMISITE(SAMISITE)_" - "_SAMISITE "RTN","SAMIHOM4",377,0) s SAMITITL=$G(SAMIARG("sitetitle")) "RTN","SAMIHOM4",378,0) m vars=SAMIARG "RTN","SAMIHOM4",379,0) ; "RTN","SAMIHOM4",380,0) k ^SAMIUL("vapals","vars") "RTN","SAMIHOM4",381,0) merge ^SAMIUL("vapals","vars")=vars "RTN","SAMIHOM4",382,0) merge ^SAMIUL("vapals","vars")=SAMIBODY "RTN","SAMIHOM4",383,0) ; "RTN","SAMIHOM4",384,0) n route s route=$g(vars("samiroute")) "RTN","SAMIHOM4",385,0) i route="" d GETHOME^SAMIHOM3(.SAMIRESULT,.SAMIARG) ; on error go home "RTN","SAMIHOM4",386,0) ; "RTN","SAMIHOM4",387,0) i route="lookup" d q 0 "RTN","SAMIHOM4",388,0) . m SAMIARG=vars "RTN","SAMIHOM4",389,0) . d WSLOOKUP^SAMISRC2(.SAMIARG,.SAMIBODY,.SAMIRESULT) "RTN","SAMIHOM4",390,0) ; "RTN","SAMIHOM4",391,0) i route="login" d q 0 "RTN","SAMIHOM4",392,0) . m SAMIARG=vars "RTN","SAMIHOM4",393,0) . d LOGIN^SAMISITE(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",394,0) ; "RTN","SAMIHOM4",395,0) i route="home" d q 0 "RTN","SAMIHOM4",396,0) . k ^gpl("home") "RTN","SAMIHOM4",397,0) . m ^gpl("home")=SAMIARG "RTN","SAMIHOM4",398,0) . s SAMIARG("samiroute")="" "RTN","SAMIHOM4",399,0) . d WSHOME^SAMIHOM3(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",400,0) ; "RTN","SAMIHOM4",401,0) i route="logout" d q 0 "RTN","SAMIHOM4",402,0) . ;s SAMIARG("samiroute")="home" "RTN","SAMIHOM4",403,0) . ;do WSVAPALS^SAMIHOM3(.SAMIFILTER,.SAMIARG,.SAMIRESULT) "RTN","SAMIHOM4",404,0) . ;Q "RTN","SAMIHOM4",405,0) . s SAMIARG("sitetitle")="Unknown Site" "RTN","SAMIHOM4",406,0) . s SAMIARG("siteid")="" "RTN","SAMIHOM4",407,0) . s SAMIARG("errorMessage")="" "RTN","SAMIHOM4",408,0) . d RTNERR^SAMIHOM4(.SAMIRESULT,"vapals:login",.SAMIARG) "RTN","SAMIHOM4",409,0) ; "RTN","SAMIHOM4",410,0) i route="newcase" d q 0 "RTN","SAMIHOM4",411,0) . m SAMIARG=vars "RTN","SAMIHOM4",412,0) . d WSNEWCAS^SAMIHOM3(.SAMIARG,.SAMIBODY,.SAMIRESULT) "RTN","SAMIHOM4",413,0) ; "RTN","SAMIHOM4",414,0) i route="casereview" d q 0 "RTN","SAMIHOM4",415,0) . m SAMIARG=vars "RTN","SAMIHOM4",416,0) . d WSCASE^SAMICASE(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",417,0) ; "RTN","SAMIHOM4",418,0) i route="nuform" d q 0 "RTN","SAMIHOM4",419,0) . m SAMIARG=vars "RTN","SAMIHOM4",420,0) . d WSNUFORM^SAMICASE(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",421,0) ; "RTN","SAMIHOM4",422,0) i route="addform" d q 0 "RTN","SAMIHOM4",423,0) . m SAMIARG=vars "RTN","SAMIHOM4",424,0) . d WSNFPOST^SAMICASE(.SAMIARG,.SAMIBODY,.SAMIRESULT) "RTN","SAMIHOM4",425,0) ; "RTN","SAMIHOM4",426,0) i route="form" d q 0 "RTN","SAMIHOM4",427,0) . m SAMIARG=vars "RTN","SAMIHOM4",428,0) . d wsGetForm^%wf(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",429,0) ; "RTN","SAMIHOM4",430,0) i route="postform" d q 0 "RTN","SAMIHOM4",431,0) . m SAMIARG=vars "RTN","SAMIHOM4",432,0) . d wsPostForm^%wf(.SAMIARG,.SAMIBODY,.SAMIRESULT) "RTN","SAMIHOM4",433,0) . i $g(SAMIARG("form"))["siform" d ; "RTN","SAMIHOM4",434,0) . . n notr s notr=0 ; note return 0 if failure, 1 or greater if success "RTN","SAMIHOM4",435,0) . . ; returns the ien of the note that was created and should be sent "RTN","SAMIHOM4",436,0) . . s notr=$$NOTE^SAMINOT1(.SAMIARG) "RTN","SAMIHOM4",437,0) . . if +notr>0 d ; "RTN","SAMIHOM4",438,0) . . . n SAMIFILTER "RTN","SAMIHOM4",439,0) . . . s SAMIFILTER("sid")=$G(SAMIARG("studyid")) "RTN","SAMIHOM4",440,0) . . . s SAMIFILTER("key")=$g(SAMIARG("form")) ; "RTN","SAMIHOM4",441,0) . . . n tiuien "RTN","SAMIHOM4",442,0) . . . s tiuien=+notr "RTN","SAMIHOM4",443,0) . . . s SAMIFILTER("notenmbr")=tiuien "RTN","SAMIHOM4",444,0) . . . n sendrslt "RTN","SAMIHOM4",445,0) . . . ;s sendrslt="1^MSG9239010" "RTN","SAMIHOM4",446,0) . . . s sendrslt=$$EN^SAMIORU(.SAMIFILTER) ; send the note to VistA "RTN","SAMIHOM4",447,0) . . . i +sendrslt>0 d ; success "RTN","SAMIHOM4",448,0) . . . . n rtnid s rtnid=$p(sendrslt,"^",2) ; return id from HL7 "RTN","SAMIHOM4",449,0) . . . . ; post the id to the graph here "RTN","SAMIHOM4",450,0) . . . . n sid s sid=$G(SAMIARG("studyid")) "RTN","SAMIHOM4",451,0) . . . . n form s form=$G(SAMIARG("form")) "RTN","SAMIHOM4",452,0) . . . . n nien s nien=$$NTIEN^SAMINOT1(sid,form) ; latest note ien "RTN","SAMIHOM4",453,0) . . . . n root s root=$$setroot^%wd("vapals-patients") "RTN","SAMIHOM4",454,0) . . . . s @root@("graph",sid,form,"notes",nien,"hl7id")=rtnid "RTN","SAMIHOM4",455,0) . . . . s SAMIARG("errorMessage")="Note successfully sent to VistA ID: "_rtnid "RTN","SAMIHOM4",456,0) . . . else d ; "RTN","SAMIHOM4",457,0) . . . . n rtnmsg s rtnmsg=$p(sendrslt,"^",2) "RTN","SAMIHOM4",458,0) . . . . s SAMIARG("errorMessage")=rtnmsg "RTN","SAMIHOM4",459,0) . . . d WSCASE^SAMICASE(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",460,0) . i $g(SAMIARG("form"))["fuform" d ; "RTN","SAMIHOM4",461,0) . . n notr s notr=0 ; note return 0 if failure, 1 or greater if success "RTN","SAMIHOM4",462,0) . . ; returns the ien of the note that was created and should be sent "RTN","SAMIHOM4",463,0) . . s notr=$$NOTE^SAMINOT2(.SAMIARG) "RTN","SAMIHOM4",464,0) . . if +notr>0 d ; "RTN","SAMIHOM4",465,0) . . . n SAMIFILTER "RTN","SAMIHOM4",466,0) . . . s SAMIFILTER("sid")=$G(SAMIARG("studyid")) "RTN","SAMIHOM4",467,0) . . . s SAMIFILTER("key")=$g(SAMIARG("form")) ; "RTN","SAMIHOM4",468,0) . . . n tiuien "RTN","SAMIHOM4",469,0) . . . s tiuien=+notr "RTN","SAMIHOM4",470,0) . . . s SAMIFILTER("notenmbr")=tiuien "RTN","SAMIHOM4",471,0) . . . n sendrslt "RTN","SAMIHOM4",472,0) . . . ;s sendrslt="0^Missing ORM Message" "RTN","SAMIHOM4",473,0) . . . s sendrslt=$$EN^SAMIORU(.SAMIFILTER) ; send the note to VistA "RTN","SAMIHOM4",474,0) . . . i +sendrslt>0 d ; success "RTN","SAMIHOM4",475,0) . . . . n rtnid s rtnid=$p(sendrslt,"^",2) ; return id from HL7 "RTN","SAMIHOM4",476,0) . . . . ; post the id to the graph here "RTN","SAMIHOM4",477,0) . . . . n sid s sid=$G(SAMIARG("studyid")) "RTN","SAMIHOM4",478,0) . . . . n form s form=$G(SAMIARG("form")) "RTN","SAMIHOM4",479,0) . . . . n nien s nien=$$NTIEN^SAMINOT1(sid,form) ; latest note ien "RTN","SAMIHOM4",480,0) . . . . n root s root=$$setroot^%wd("vapals-patients") "RTN","SAMIHOM4",481,0) . . . . s @root@("graph",sid,form,"notes",nien,"hl7id")=rtnid "RTN","SAMIHOM4",482,0) . . . . s SAMIARG("errorMessage")="Note successfully sent to VistA ID: "_rtnid "RTN","SAMIHOM4",483,0) . . . else d ; "RTN","SAMIHOM4",484,0) . . . . n rtnmsg s rtnmsg=$p(sendrslt,"^",2) "RTN","SAMIHOM4",485,0) . . . . i $g(SAMIARG("errorMessage"))="" d ; "RTN","SAMIHOM4",486,0) . . . . . s SAMIARG("errorMessage")=rtnmsg "RTN","SAMIHOM4",487,0) . . . d WSCASE^SAMICASE(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",488,0) . . e d WSCASE^SAMICASE(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",489,0) . e d WSCASE^SAMICASE(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",490,0) ; "RTN","SAMIHOM4",491,0) i route="deleteform" d q 0 "RTN","SAMIHOM4",492,0) . m SAMIARG=vars "RTN","SAMIHOM4",493,0) . d DELFORM^SAMICASE(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",494,0) ; "RTN","SAMIHOM4",495,0) i route="ctreport" d q 0 "RTN","SAMIHOM4",496,0) . m SAMIARG=vars "RTN","SAMIHOM4",497,0) . n format s format="html" "RTN","SAMIHOM4",498,0) . s format="text" "RTN","SAMIHOM4",499,0) . i format="text" d WSNOTE^SAMINOT3(.SAMIRESULT,.SAMIARG) q ; "RTN","SAMIHOM4",500,0) . i format="html" d WSREPORT^SAMICTR0(.SAMIRESULT,.SAMIARG) q ; "RTN","SAMIHOM4",501,0) . ;d wsReport^SAMICTRT(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",502,0) ; "RTN","SAMIHOM4",503,0) i route="note" d q 0 "RTN","SAMIHOM4",504,0) . m SAMIARG=vars "RTN","SAMIHOM4",505,0) . d WSNOTE^SAMINOT1(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",506,0) ; "RTN","SAMIHOM4",507,0) i route="report" d q 0 "RTN","SAMIHOM4",508,0) . m SAMIARG=vars "RTN","SAMIHOM4",509,0) . d WSREPORT^SAMIUR(.SAMIRESULT,.vars) "RTN","SAMIHOM4",510,0) ; "RTN","SAMIHOM4",511,0) i route="addperson" d q 0 "RTN","SAMIHOM4",512,0) . m SAMIARG=vars "RTN","SAMIHOM4",513,0) . n form "RTN","SAMIHOM4",514,0) . s form="vapals:addperson" "RTN","SAMIHOM4",515,0) . d RTNPAGE^SAMIHOM4(.SAMIRESULT,form,.SAMIARG) q ; "RTN","SAMIHOM4",516,0) ; "RTN","SAMIHOM4",517,0) i route="editperson" d q 0 "RTN","SAMIHOM4",518,0) . m SAMIARG=vars "RTN","SAMIHOM4",519,0) . n dfn s dfn=$g(vars("dfn")) ; must have a dfn "RTN","SAMIHOM4",520,0) . i dfn="" d q ; "RTN","SAMIHOM4",521,0) . . d GETHOME^SAMIHOM3(.SAMIRESULT,.SAMIARG) ; on error go home "RTN","SAMIHOM4",522,0) . n root s root=$$setroot^%wd("patient-lookup") "RTN","SAMIHOM4",523,0) . n sien s sien=$o(@root@("dfn",dfn,"")) "RTN","SAMIHOM4",524,0) . i sien="" d q ; "RTN","SAMIHOM4",525,0) . . d GETHOME^SAMIHOM3(.SAMIRESULT,.SAMIARG) ; on error go home "RTN","SAMIHOM4",526,0) . s vars("name")=$g(@root@(sien,"saminame")) "RTN","SAMIHOM4",527,0) . s tdob=$g(@root@(sien,"dob")) "RTN","SAMIHOM4",528,0) . s vars("dob")=$p(tdob,"-",2)_"/"_$p(tdob,"-",3)_"/"_$p(tdob,"-",1) "RTN","SAMIHOM4",529,0) . s vars("sbdob")=$g(@root@(sien,"dob")) "RTN","SAMIHOM4",530,0) . s vars("gender")=$g(@root@(sien,"sex")) "RTN","SAMIHOM4",531,0) . ; s vars("icn")=$g(@root@(sien,"icn")) "RTN","SAMIHOM4",532,0) . n tssn s tssn=$g(@root@(sien,"ssn")) "RTN","SAMIHOM4",533,0) . s vars("ssn")=$e(tssn,1,3)_"-"_$e(tssn,4,5)_"-"_$e(tssn,6,9) "RTN","SAMIHOM4",534,0) . s vars("last5")=$g(@root@(sien,"last5")) "RTN","SAMIHOM4",535,0) . s vars("dfn")=$g(@root@(sien,"dfn")) "RTN","SAMIHOM4",536,0) . m SAMIARG=vars "RTN","SAMIHOM4",537,0) . n form,err,zhtml "RTN","SAMIHOM4",538,0) . s form="vapals:editparticipant" "RTN","SAMIHOM4",539,0) . d RTNPAGE^SAMIHOM4(.SAMIRESULT,form,.SAMIARG) q ; "RTN","SAMIHOM4",540,0) ; "RTN","SAMIHOM4",541,0) i route="register" d q 0 "RTN","SAMIHOM4",542,0) . m SAMIARG=vars "RTN","SAMIHOM4",543,0) . d REG^SAMIHOM4(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",544,0) ; "RTN","SAMIHOM4",545,0) i route="editsave" d q 0 "RTN","SAMIHOM4",546,0) . m SAMIARG=vars "RTN","SAMIHOM4",547,0) . d SAVE^SAMIHOM4(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",548,0) ; "RTN","SAMIHOM4",549,0) i route="merge" d q 0 "RTN","SAMIHOM4",550,0) . m SAMIARG=vars "RTN","SAMIHOM4",551,0) . d MERGE^SAMIHOM4(.SAMIRESULT,.SAMIARG) "RTN","SAMIHOM4",552,0) ; "RTN","SAMIHOM4",553,0) quit 0 ; end of wsi WSVAPALS^SAMIHOM3 "RTN","SAMIHOM4",554,0) ; "RTN","SAMIHOM4",555,0) ; "RTN","SAMIHOM4",556,0) ; "RTN","SAMIHOM4",557,0) ;@section 3 other "RTN","SAMIHOM4",558,0) ; "RTN","SAMIHOM4",559,0) ; "RTN","SAMIHOM4",560,0) ; "RTN","SAMIHOM4",561,0) REG(SAMIRTN,SAMIARG) ; manual registration "RTN","SAMIHOM4",562,0) ; "RTN","SAMIHOM4",563,0) n name s name=$g(SAMIARG("name")) "RTN","SAMIHOM4",564,0) ; "RTN","SAMIHOM4",565,0) m ^gpl("reg")=SAMIARG "RTN","SAMIHOM4",566,0) n ssn s ssn=SAMIARG("ssn") "RTN","SAMIHOM4",567,0) s ssn=$tr(ssn,"-") "RTN","SAMIHOM4",568,0) s SAMIARG("errorMessage")="" "RTN","SAMIHOM4",569,0) s SAMIARG("errorField")="" "RTN","SAMIHOM4",570,0) ; test for duplicate ssn "RTN","SAMIHOM4",571,0) ; "RTN","SAMIHOM4",572,0) ;i $$DUPSSN(ssn) d ; "RTN","SAMIHOM4",573,0) ;. ;s SAMIARG("errorMessage")=SAMIARG("errorMessage")_" Duplicate SSN." "RTN","SAMIHOM4",574,0) ;. s SAMIARG("errorMessage")=SAMIARG("errorMessage")_" Duplicate SSN error. A person with that SSN is already entered in the system." "RTN","SAMIHOM4",575,0) ;. s SAMIARG("errorField")="ssn" "RTN","SAMIHOM4",576,0) ; "RTN","SAMIHOM4",577,0) ; test for duplicate icn "RTN","SAMIHOM4",578,0) ; "RTN","SAMIHOM4",579,0) ;n icn s icn=$g(SAMIARG("icn")) "RTN","SAMIHOM4",580,0) ;i icn'="" i $$DUPICN(icn) d ; "RTN","SAMIHOM4",581,0) ;. s SAMIARG("errorMessage")=SAMIARG("errorMessage")_" Duplicate ICN error. A person with that ICN is already entered in the system." "RTN","SAMIHOM4",582,0) ;. s SAMIARG("errorField")="icn" "RTN","SAMIHOM4",583,0) ;; "RTN","SAMIHOM4",584,0) ;; test for wellformed ICN "RTN","SAMIHOM4",585,0) ;; "RTN","SAMIHOM4",586,0) ;i icn'="" i $$BADICN(icn) d ; "RTN","SAMIHOM4",587,0) ;. s SAMIARG("errorMessage")=SAMIARG("errorMessage")_" Invalid ICN error. The check digits in the ICN do not match" "RTN","SAMIHOM4",588,0) ;. s SAMIARG("errorField")="icn" "RTN","SAMIHOM4",589,0) ;; "RTN","SAMIHOM4",590,0) ; if there is an error, send back to edit with error message "RTN","SAMIHOM4",591,0) i $g(SAMIARG("errorMessage"))'="" d q ; "RTN","SAMIHOM4",592,0) . n form "RTN","SAMIHOM4",593,0) . s form="vapals:addperson" "RTN","SAMIHOM4",594,0) . d RTNERR(.SAMIRESULT,form,.SAMIARG) "RTN","SAMIHOM4",595,0) ; "RTN","SAMIHOM4",596,0) n root s root=$$setroot^%wd("patient-lookup") "RTN","SAMIHOM4",597,0) n proot s proot=$$setroot^%wd("vapals-patients") "RTN","SAMIHOM4",598,0) n ptlkien s ptlkien="" "RTN","SAMIHOM4",599,0) n dfn s dfn="" "RTN","SAMIHOM4",600,0) n sien s sien="" "RTN","SAMIHOM4",601,0) i ptlkien="" s ptlkien=$o(@root@("AAAAAA"),-1)+1 "RTN","SAMIHOM4",602,0) n zm "RTN","SAMIHOM4",603,0) k SAMIARG("MATCHLOG") "RTN","SAMIHOM4",604,0) s zm=$$REMATCH(sien,.SAMIARG) "RTN","SAMIHOM4",605,0) i zm>0 d ; "RTN","SAMIHOM4",606,0) . s SAMIARG("MATCHLOG")=zm "RTN","SAMIHOM4",607,0) d MKPTLK(ptlkien,.SAMIARG) ; make the patient-lookup record "RTN","SAMIHOM4",608,0) ; "RTN","SAMIHOM4",609,0) s dfn=$o(@root@("dfn"," "),-1)+1 "RTN","SAMIHOM4",610,0) n pdfn "RTN","SAMIHOM4",611,0) s pdfn=$o(@proot@("dfn"," "),-1)+1 "RTN","SAMIHOM4",612,0) i pdfn>dfn s dfn=pdfn ; need a dfn that has not been used "RTN","SAMIHOM4",613,0) i dfn<9000001 s dfn=9000001 "RTN","SAMIHOM4",614,0) s @root@(ptlkien,"dfn")=dfn "RTN","SAMIHOM4",615,0) d INDXPTLK(ptlkien) "RTN","SAMIHOM4",616,0) s SAMIFILTER("samiroute")="addperson" "RTN","SAMIHOM4",617,0) s SAMIFILTER("siteid")=$G(SAMIARG("siteid")) "RTN","SAMIHOM4",618,0) s SAMIFILTER("sitetitle")=$G(SAMIARG("sitetitle")) "RTN","SAMIHOM4",619,0) k SAMIARG ; return to a blank manual registration form "RTN","SAMIHOM4",620,0) s SAMIARG("siteid")=$G(SAMIFILTER("siteid")) "RTN","SAMIHOM4",621,0) s SAMIARG("sitetitle")=$G(SAMIFILTER("sitetitle")) "RTN","SAMIHOM4",622,0) d SETINFO(.SAMIFILTER,name_" was successfully entered") "RTN","SAMIHOM4",623,0) ;d SETWARN(.SAMIFILTER,"We might want to give you a warning") "RTN","SAMIHOM4",624,0) do WSVAPALS^SAMIHOM3(.SAMIFILTER,.SAMIARG,.SAMIRESULT) "RTN","SAMIHOM4",625,0) ; "RTN","SAMIHOM4",626,0) quit ; end of REG "RTN","SAMIHOM4",627,0) ; "RTN","SAMIHOM4",628,0) ; "RTN","SAMIHOM4",629,0) ; "RTN","SAMIHOM4",630,0) MKPTLK(ptlkien,SAMIARG) ; creates patient-lookup record "RTN","SAMIHOM4",631,0) ; "RTN","SAMIHOM4",632,0) n ssn s ssn=SAMIARG("ssn") "RTN","SAMIHOM4",633,0) s ssn=$tr(ssn,"-") "RTN","SAMIHOM4",634,0) n name s name=$g(SAMIARG("name")) "RTN","SAMIHOM4",635,0) n sinamef,sinamel "RTN","SAMIHOM4",636,0) s sinamel=$p(name,","),sinamel=$$TRIM^XLFSTR(sinamel,"LR") "RTN","SAMIHOM4",637,0) s sinamef=$p(name,",",2),sinamef=$$TRIM^XLFSTR(sinamef,"LR") "RTN","SAMIHOM4",638,0) s name=sinamel_","_sinamef "RTN","SAMIHOM4",639,0) n siteid s siteid=$g(SAMIARG("siteid")) "RTN","SAMIHOM4",640,0) i siteid="" s siteid=$g(SAMIARG("site")) "RTN","SAMIHOM4",641,0) ; "RTN","SAMIHOM4",642,0) s @root@(ptlkien,"siteid")=siteid "RTN","SAMIHOM4",643,0) s @root@(ptlkien,"saminame")=name "RTN","SAMIHOM4",644,0) s @root@(ptlkien,"sinamef")=sinamef "RTN","SAMIHOM4",645,0) s @root@(ptlkien,"sinamel")=sinamel "RTN","SAMIHOM4",646,0) n fmdob s fmdob=$$FMDT^SAMIUR2(SAMIARG("dob")) "RTN","SAMIHOM4",647,0) n ptlkdob s ptlkdob=$$FMTE^XLFDT(fmdob,7) "RTN","SAMIHOM4",648,0) s ptlkdob=$TR(ptlkdob,"/","-") "RTN","SAMIHOM4",649,0) s @root@(ptlkien,"dob")=ptlkdob "RTN","SAMIHOM4",650,0) s @root@(ptlkien,"sbdob")=ptlkdob "RTN","SAMIHOM4",651,0) n gender s gender=SAMIARG("gender") "RTN","SAMIHOM4",652,0) s @root@(ptlkien,"gender")=$s(gender="M":"M^MALE",1:"F^FEMALE") "RTN","SAMIHOM4",653,0) s @root@(ptlkien,"sex")=SAMIARG("gender") "RTN","SAMIHOM4",654,0) ; s @root@(ptlkien,"icn")=SAMIARG("icn") "RTN","SAMIHOM4",655,0) s @root@(ptlkien,"ssn")=ssn "RTN","SAMIHOM4",656,0) n last5 s last5=$$UCASE($e(name,1))_$e(ssn,6,9) "RTN","SAMIHOM4",657,0) s @root@(ptlkien,"last5")=last5 "RTN","SAMIHOM4",658,0) n mymatch s mymatch=$g(SAMIARG("MATCHLOG")) "RTN","SAMIHOM4",659,0) i mymatch'="" s @root@(ptlkien,"MATCHLOG")=mymatch "RTN","SAMIHOM4",660,0) ; "RTN","SAMIHOM4",661,0) quit ; end of MKPTLK "RTN","SAMIHOM4",662,0) ; "RTN","SAMIHOM4",663,0) ; "RTN","SAMIHOM4",664,0) ; "RTN","SAMIHOM4",665,0) UPDTFRMS(dfn) ; update demographics in all forms for patient "RTN","SAMIHOM4",666,0) ; "RTN","SAMIHOM4",667,0) n lroot s lroot=$$setroot^%wd("patient-lookup") "RTN","SAMIHOM4",668,0) n proot s proot=$$setroot^%wd("vapals-patients") "RTN","SAMIHOM4",669,0) n lien s lien=$o(@lroot@("dfn",dfn,"")) "RTN","SAMIHOM4",670,0) q:lien="" "RTN","SAMIHOM4",671,0) n pien s pien=$o(@proot@("dfn",dfn,"")) "RTN","SAMIHOM4",672,0) q:pien="" "RTN","SAMIHOM4",673,0) ; this patient has forms "RTN","SAMIHOM4",674,0) m @proot@(pien)=@lroot@(lien) ; refresh the demos in the patient record "RTN","SAMIHOM4",675,0) n ssn s ssn=$g(@proot@(pien,"ssn")) "RTN","SAMIHOM4",676,0) s @proot@(pien,"sissn")=$e(ssn,1,3)_"-"_$e(ssn,4,5)_"-"_$e(ssn,6,9) "RTN","SAMIHOM4",677,0) n sid s sid=$g(@proot@("sisid")) ; studyid "RTN","SAMIHOM4",678,0) q:sid="" ; no studyid "RTN","SAMIHOM4",679,0) n zi s zi="" "RTN","SAMIHOM4",680,0) f s zi=$o(@proot@("graph",sid,zi)) q:zi="" d ; for each form "RTN","SAMIHOM4",681,0) . m @proot@("graph",sid,zi)=@proot@(pien) ; stamp each form with new demos "RTN","SAMIHOM4",682,0) ; "RTN","SAMIHOM4",683,0) quit ; end of UPDTFRMS "RTN","SAMIHOM4",684,0) ; "RTN","SAMIHOM4",685,0) ; "RTN","SAMIHOM4",686,0) ; "RTN","SAMIHOM4",687,0) MERGE(SAMIRESULT,SAMIARGS) ; merge participant records "RTN","SAMIHOM4",688,0) ; "RTN","SAMIHOM4",689,0) ; called from pressing the merge button on the unmatched report "RTN","SAMIHOM4",690,0) ; "RTN","SAMIHOM4",691,0) n toien s toien=$g(SAMIARGS("toien")) "RTN","SAMIHOM4",692,0) i toien="" d q ; "RTN","SAMIHOM4",693,0) . d WSUNMAT(.SAMIRESULT,.SAMIARGS) "RTN","SAMIHOM4",694,0) n lroot s lroot=$$setroot^%wd("patient-lookup") "RTN","SAMIHOM4",695,0) n fromien s fromien=$g(@lroot@(toien,"MATCHLOG")) "RTN","SAMIHOM4",696,0) i fromien="" d q ; "RTN","SAMIHOM4",697,0) . d WSUNMAT(.SAMIRESULT,.SAMIARGS) "RTN","SAMIHOM4",698,0) ; "RTN","SAMIHOM4",699,0) ; test for remotedfn in from record - not valid if absent "RTN","SAMIHOM4",700,0) ; "RTN","SAMIHOM4",701,0) i $g(@lroot@(fromien,"remotedfn"))="" d q ; "RTN","SAMIHOM4",702,0) . d WSUNMAT(.SAMIRESULT,.SAMIARGS) "RTN","SAMIHOM4",703,0) ; "RTN","SAMIHOM4",704,0) ; remove index entries for from and to records "RTN","SAMIHOM4",705,0) ; "RTN","SAMIHOM4",706,0) d UNINDXPT(fromien) ; delete index entries "RTN","SAMIHOM4",707,0) d UNINDXPT(toien) "RTN","SAMIHOM4",708,0) ; "RTN","SAMIHOM4",709,0) ; create changelog entry in to record - contains from record "RTN","SAMIHOM4",710,0) ; "RTN","SAMIHOM4",711,0) m @lroot@(toien,"changelog",$$FMTE^XLFDT($$NOW^XLFDT,5))=@lroot@(fromien) "RTN","SAMIHOM4",712,0) ; "RTN","SAMIHOM4",713,0) ; change the dfn in the from record to the to record dfn for merging "RTN","SAMIHOM4",714,0) ; "RTN","SAMIHOM4",715,0) s @lroot@(fromien,"dfn")=@lroot@(toien,"dfn") "RTN","SAMIHOM4",716,0) n dfn s dfn=@lroot@(toien,"dfn") ; for use in updating forms "RTN","SAMIHOM4",717,0) ; "RTN","SAMIHOM4",718,0) ; merge the from record to the to record "RTN","SAMIHOM4",719,0) ; "RTN","SAMIHOM4",720,0) m @lroot@(toien)=@lroot@(fromien) "RTN","SAMIHOM4",721,0) ; "RTN","SAMIHOM4",722,0) ; delete the from record "RTN","SAMIHOM4",723,0) ; "RTN","SAMIHOM4",724,0) k @lroot@(fromien) "RTN","SAMIHOM4",725,0) ; "RTN","SAMIHOM4",726,0) ; reindex the to record "RTN","SAMIHOM4",727,0) ; "RTN","SAMIHOM4",728,0) d INDXPTLK(toien) "RTN","SAMIHOM4",729,0) ; "RTN","SAMIHOM4",730,0) ; propagate the updated from record to every form "RTN","SAMIHOM4",731,0) ; "RTN","SAMIHOM4",732,0) d UPDTFRMS(dfn) ; updates the patient in the vapals-patient graph "RTN","SAMIHOM4",733,0) ; "RTN","SAMIHOM4",734,0) ; leave and return to the unmatched report "RTN","SAMIHOM4",735,0) ; note that the form and to records will no longer be in the report "RTN","SAMIHOM4",736,0) ; "RTN","SAMIHOM4",737,0) d WSUNMAT(.SAMIRESULT,.SAMIARGS) "RTN","SAMIHOM4",738,0) ; "RTN","SAMIHOM4",739,0) quit ; end of MERGE "RTN","SAMIHOM4",740,0) ; "RTN","SAMIHOM4",741,0) ; "RTN","SAMIHOM4",742,0) ; "RTN","SAMIHOM4",743,0) ADDUNMAT ; adds unmatched report web service to system "RTN","SAMIHOM4",744,0) ; "RTN","SAMIHOM4",745,0) d addService^%webutils("GET","unmatched","WSUNMAT^SAMIHOM4") "RTN","SAMIHOM4",746,0) ; "RTN","SAMIHOM4",747,0) quit ; end of ADDUNMAT "RTN","SAMIHOM4",748,0) ; "RTN","SAMIHOM4",749,0) ; "RTN","SAMIHOM4",750,0) ; "RTN","SAMIHOM4",751,0) DELUNMAT ; deletes unmatched web service "RTN","SAMIHOM4",752,0) ; "RTN","SAMIHOM4",753,0) d deleteService^%webutils("GET","unmatched") "RTN","SAMIHOM4",754,0) ; "RTN","SAMIHOM4",755,0) quit ; end of DELUNMAT "RTN","SAMIHOM4",756,0) ; "RTN","SAMIHOM4",757,0) ; "RTN","SAMIHOM4",758,0) ; "RTN","SAMIHOM4",759,0) WSUNMAT(SAMIRESULT,SAMIARGS) ; navigates to unmatched report "RTN","SAMIHOM4",760,0) ; "RTN","SAMIHOM4",761,0) n filter,bdy "RTN","SAMIHOM4",762,0) s bdy="" "RTN","SAMIHOM4",763,0) ;s filter("siteid")="PHX" "RTN","SAMIHOM4",764,0) s filter("samiroute")="report" "RTN","SAMIHOM4",765,0) s filter("samireporttype")="unmatched" "RTN","SAMIHOM4",766,0) d WSVAPALS^SAMIHOM3(.filter,.bdy,.SAMIRESULT) ; back to the unmatched report "RTN","SAMIHOM4",767,0) ; "RTN","SAMIHOM4",768,0) quit ; end of WSUNMAT "RTN","SAMIHOM4",769,0) ; "RTN","SAMIHOM4",770,0) ; "RTN","SAMIHOM4",771,0) ; "RTN","SAMIHOM4",772,0) DUPSSN(ssn) ; extrinsic returns true if duplicate ssn "RTN","SAMIHOM4",773,0) ; "RTN","SAMIHOM4",774,0) n proot s proot=$$setroot^%wd("patient-lookup") "RTN","SAMIHOM4",775,0) i $d(@proot@("ssn",ssn)) q 1 "RTN","SAMIHOM4",776,0) ; "RTN","SAMIHOM4",777,0) quit 0 ; end of $$DUPSSN "RTN","SAMIHOM4",778,0) ; "RTN","SAMIHOM4",779,0) ; "RTN","SAMIHOM4",780,0) ; "RTN","SAMIHOM4",781,0) DUPICN(icn) ; extrinsic returns true if duplicate icn "RTN","SAMIHOM4",782,0) ; "RTN","SAMIHOM4",783,0) n proot s proot=$$setroot^%wd("patient-lookup") "RTN","SAMIHOM4",784,0) n tmpicn s tmpicn=$p(icn,"V",1) "RTN","SAMIHOM4",785,0) i $d(@proot@("icn",icn)) q 1 "RTN","SAMIHOM4",786,0) i $d(@proot@("icn",tmpicn)) q 1 "RTN","SAMIHOM4",787,0) ; "RTN","SAMIHOM4",788,0) quit 0 ; end of $$DUPICN "RTN","SAMIHOM4",789,0) ; "RTN","SAMIHOM4",790,0) ; "RTN","SAMIHOM4",791,0) ; "RTN","SAMIHOM4",792,0) BADICN(icn) ; extrinsic returns true if ICN checkdigits are wrong "RTN","SAMIHOM4",793,0) ; "RTN","SAMIHOM4",794,0) n zchk s zchk=$p(icn,"V",2) "RTN","SAMIHOM4",795,0) n zicn s zicn=$p(icn,"V",1) "RTN","SAMIHOM4",796,0) q:zchk="" 1 "RTN","SAMIHOM4",797,0) i zchk'=$$CHECKDG^MPIFSPC(zicn) q 1 "RTN","SAMIHOM4",798,0) ; "RTN","SAMIHOM4",799,0) quit 0 "RTN","SAMIHOM4",800,0) ; "RTN","SAMIHOM4",801,0) ; "RTN","SAMIHOM4",802,0) ; "RTN","SAMIHOM4",803,0) SAVE(SAMIRESULT,SAMIARG) ; save patient-lookup record after edit "RTN","SAMIHOM4",804,0) ; "RTN","SAMIHOM4",805,0) n dfn s dfn=$g(vars("dfn")) ; must have a dfn "RTN","SAMIHOM4",806,0) i dfn="" d q ; "RTN","SAMIHOM4",807,0) . d GETHOME^SAMIHOM3(.SAMIRESULT,.SAMIARG) ; on error go home "RTN","SAMIHOM4",808,0) n root s root=$$setroot^%wd("patient-lookup") "RTN","SAMIHOM4",809,0) n sien s sien=$o(@root@("dfn",dfn,"")) "RTN","SAMIHOM4",810,0) i sien="" d q ; "RTN","SAMIHOM4",811,0) . d GETHOME^SAMIHOM3(.SAMIRESULT,.SAMIARG) ; on error go home "RTN","SAMIHOM4",812,0) d UNINDXPT(sien) ; remove old index entries "RTN","SAMIHOM4",813,0) n zm "RTN","SAMIHOM4",814,0) k SAMIARG("MATCHLOG") "RTN","SAMIHOM4",815,0) s zm=$$REMATCH(sien,.SAMIARG) "RTN","SAMIHOM4",816,0) i zm>0 d ; "RTN","SAMIHOM4",817,0) . s SAMIARG("MATCHLOG")=zm "RTN","SAMIHOM4",818,0) d MKPTLK(sien,.SAMIARG) ; add the updated fields "RTN","SAMIHOM4",819,0) d INDXPTLK(sien) ; create new index entries "RTN","SAMIHOM4",820,0) d UPDTFRMS(dfn) ; update demographic info in all forms "RTN","SAMIHOM4",821,0) n filter,bdy "RTN","SAMIHOM4",822,0) s bdy="" "RTN","SAMIHOM4",823,0) m filter=SAMIARG "RTN","SAMIHOM4",824,0) s filter("samiroute")="report" "RTN","SAMIHOM4",825,0) s filter("samireporttype")="unmatched" "RTN","SAMIHOM4",826,0) d WSVAPALS^SAMIHOM3(.filter,.bdy,.SAMIRESULT) ; back to the unmatched report "RTN","SAMIHOM4",827,0) ; "RTN","SAMIHOM4",828,0) quit ; end of SAVE "RTN","SAMIHOM4",829,0) ; "RTN","SAMIHOM4",830,0) ; "RTN","SAMIHOM4",831,0) ; "RTN","SAMIHOM4",832,0) REMATCH(sien,SAMIARG) ; extrinsic returns possible match ien "RTN","SAMIHOM4",833,0) ; "RTN","SAMIHOM4",834,0) ; else zero "RTN","SAMIHOM4",835,0) ; "RTN","SAMIHOM4",836,0) n lroot s lroot=$$setroot^%wd("patient-lookup") "RTN","SAMIHOM4",837,0) n ssn,name,icn,x,y "RTN","SAMIHOM4",838,0) s ssn=$g(SAMIARG("ssn")) "RTN","SAMIHOM4",839,0) i ssn["-" s ssn=$tr(ssn,"-") "RTN","SAMIHOM4",840,0) s name=$g(SAMIARG("saminame")) "RTN","SAMIHOM4",841,0) i name="" s name=$g(SAMIARG("name")) "RTN","SAMIHOM4",842,0) s name=$$UCASE(name) "RTN","SAMIHOM4",843,0) ; s icn=$g(SAMIARG("icn")) "RTN","SAMIHOM4",844,0) s x=0 "RTN","SAMIHOM4",845,0) i ssn'="" s x=$o(@lroot@("ssn",ssn,"")) "RTN","SAMIHOM4",846,0) i x=sien s x=$o(@lroot@("ssn",ssn,x)) "RTN","SAMIHOM4",847,0) i +x'=0 d ; "RTN","SAMIHOM4",848,0) . s y=$g(@lroot@(x,"dfn")) "RTN","SAMIHOM4",849,0) . ;i y>9000000 s x=0 "RTN","SAMIHOM4",850,0) i x>0 q x "RTN","SAMIHOM4",851,0) i name'="" s x=$o(@lroot@("name",name,"")) "RTN","SAMIHOM4",852,0) i x=sien s x=$o(@lroot@("name",name,x)) "RTN","SAMIHOM4",853,0) i +x'=0 d ; "RTN","SAMIHOM4",854,0) . s y=$g(@lroot@(x,"dfn")) "RTN","SAMIHOM4",855,0) . ;i y>9000000 s x=0 "RTN","SAMIHOM4",856,0) i x>0 q x "RTN","SAMIHOM4",857,0) ;i icn'="" s x=$o(@lroot@("icn",icn,"")) "RTN","SAMIHOM4",858,0) ;i x=sien s x=$o(@lroot@("icn",icn,x)) "RTN","SAMIHOM4",859,0) ;i +x'=0 d ; "RTN","SAMIHOM4",860,0) ;. s y=$g(@lroot@(x,"dfn")) "RTN","SAMIHOM4",861,0) ;. i y>9000000 s x=0 "RTN","SAMIHOM4",862,0) ;i x>0 q x "RTN","SAMIHOM4",863,0) ; "RTN","SAMIHOM4",864,0) quit 0 ; end of $$REMATCH "RTN","SAMIHOM4",865,0) ; "RTN","SAMIHOM4",866,0) ; "RTN","SAMIHOM4",867,0) ; "RTN","SAMIHOM4",868,0) SETINFO(vars,msg) ; set information message text "RTN","SAMIHOM4",869,0) ; "RTN","SAMIHOM4",870,0) ; vars are the screen variables passed by reference "RTN","SAMIHOM4",871,0) ; "RTN","SAMIHOM4",872,0) s vars("infoMessage")=msg "RTN","SAMIHOM4",873,0) ; "RTN","SAMIHOM4",874,0) quit ; end of SETINFO "RTN","SAMIHOM4",875,0) ; "RTN","SAMIHOM4",876,0) ; "RTN","SAMIHOM4",877,0) ; "RTN","SAMIHOM4",878,0) SETWARN(vars,msg) ; set warning message text "RTN","SAMIHOM4",879,0) ; "RTN","SAMIHOM4",880,0) ; vars are the screen variables passed by reference "RTN","SAMIHOM4",881,0) ; "RTN","SAMIHOM4",882,0) s vars("warnMessage")=msg "RTN","SAMIHOM4",883,0) ; "RTN","SAMIHOM4",884,0) quit ; end of SETWARN "RTN","SAMIHOM4",885,0) ; "RTN","SAMIHOM4",886,0) ; "RTN","SAMIHOM4",887,0) ; "RTN","SAMIHOM4",888,0) RTNERR(rtn,form,vals,msg,fld) ; redisplay page w/error message "RTN","SAMIHOM4",889,0) ; "RTN","SAMIHOM4",890,0) ; rtn is the return array "RTN","SAMIHOM4",891,0) ; form is the form the page requires "RTN","SAMIHOM4",892,0) ; vals are the values for the page. passed by reference "RTN","SAMIHOM4",893,0) ; msg is the error message to be displayed "RTN","SAMIHOM4",894,0) ; fld is the name of the field where the cursor should be put "RTN","SAMIHOM4",895,0) ; "RTN","SAMIHOM4",896,0) n zhtml ; work area for the tempate "RTN","SAMIHOM4",897,0) d SAMIHTM^%wf(.zhtml,form,.err) "RTN","SAMIHOM4",898,0) d MERGEHTM^%wf(.zhtml,.vals,.err) "RTN","SAMIHOM4",899,0) m rtn=zhtml "RTN","SAMIHOM4",900,0) set HTTPRSP("mime")="text/html" ; set mime type "RTN","SAMIHOM4",901,0) ; "RTN","SAMIHOM4",902,0) quit ; end of RTNERR "RTN","SAMIHOM4",903,0) ; "RTN","SAMIHOM4",904,0) ; "RTN","SAMIHOM4",905,0) ; "RTN","SAMIHOM4",906,0) RTNPAGE(rtn,form,vals) ; display page "RTN","SAMIHOM4",907,0) ; "RTN","SAMIHOM4",908,0) ; rtn is the return array "RTN","SAMIHOM4",909,0) ; form is the form the page requires "RTN","SAMIHOM4",910,0) ; vals are the values for the page. passed by reference "RTN","SAMIHOM4",911,0) ; "RTN","SAMIHOM4",912,0) n err "RTN","SAMIHOM4",913,0) n zhtml ; work area for the tempate "RTN","SAMIHOM4",914,0) d SAMIHTM^%wf(.zhtml,form,.err) "RTN","SAMIHOM4",915,0) d MERGEHTM^%wf(.zhtml,.vals,.err) "RTN","SAMIHOM4",916,0) m SAMIRESULT=zhtml "RTN","SAMIHOM4",917,0) set HTTPRSP("mime")="text/html" ; set mime type "RTN","SAMIHOM4",918,0) ; "RTN","SAMIHOM4",919,0) quit ; end of RTNPAGE "RTN","SAMIHOM4",920,0) ; "RTN","SAMIHOM4",921,0) ; "RTN","SAMIHOM4",922,0) ; "RTN","SAMIHOM4",923,0) REINDXPL ; reindex patient lookup "RTN","SAMIHOM4",924,0) ; "RTN","SAMIHOM4",925,0) n root s root=$$setroot^%wd("patient-lookup") "RTN","SAMIHOM4",926,0) n zi s zi=0 "RTN","SAMIHOM4",927,0) k @root@("ssn") "RTN","SAMIHOM4",928,0) k @root@("name") "RTN","SAMIHOM4",929,0) k @root@("last5") "RTN","SAMIHOM4",930,0) k @root@("sinamef") "RTN","SAMIHOM4",931,0) k @root@("sinamel") "RTN","SAMIHOM4",932,0) ; k @root@("icn") "RTN","SAMIHOM4",933,0) f s zi=$o(@root@(zi)) q:+zi=0 d ; "RTN","SAMIHOM4",934,0) . d INDXPTLK(zi) "RTN","SAMIHOM4",935,0) ; "RTN","SAMIHOM4",936,0) quit ; end of REINDXPL "RTN","SAMIHOM4",937,0) ; "RTN","SAMIHOM4",938,0) ; "RTN","SAMIHOM4",939,0) ; "RTN","SAMIHOM4",940,0) INDXPTLK(ien) ; generate index entries in patient-lookup graph "RTN","SAMIHOM4",941,0) ; "RTN","SAMIHOM4",942,0) ; for entry ien "RTN","SAMIHOM4",943,0) ; "RTN","SAMIHOM4",944,0) n proot set proot=$$setroot^%wd("patient-lookup") "RTN","SAMIHOM4",945,0) n name s name=$g(@proot@(ien,"saminame")) "RTN","SAMIHOM4",946,0) s @proot@("name",name,ien)="" "RTN","SAMIHOM4",947,0) n ucname s ucname=$$UCASE(name) "RTN","SAMIHOM4",948,0) s @proot@("name",ucname,ien)="" "RTN","SAMIHOM4",949,0) n x "RTN","SAMIHOM4",950,0) s x=$g(@proot@(ien,"dfn")) ;w !,x "RTN","SAMIHOM4",951,0) s:x'="" @proot@("dfn",x,ien)="" "RTN","SAMIHOM4",952,0) s x=$g(@proot@(ien,"last5")) ;w !,x "RTN","SAMIHOM4",953,0) s:x'="" @proot@("last5",x,ien)="" "RTN","SAMIHOM4",954,0) ; "RTN","SAMIHOM4",955,0) ; s x=$g(@proot@(ien,"icn")) ;w !,x "RTN","SAMIHOM4",956,0) ; i x'["V" d ; "RTN","SAMIHOM4",957,0) ; . i x="" q "RTN","SAMIHOM4",958,0) ; . n chk s chk=$$CHECKDG^MPIFSPC(x) "RTN","SAMIHOM4",959,0) ; . s @proot@(ien,"icn")=x_"V"_chk "RTN","SAMIHOM4",960,0) ; . s x=x_"V"_chk "RTN","SAMIHOM4",961,0) ; s:x'="" @proot@("icn",x,ien)="" "RTN","SAMIHOM4",962,0) ; "RTN","SAMIHOM4",963,0) s x=$g(@proot@(ien,"ssn")) ;w !,x "RTN","SAMIHOM4",964,0) s:x'="" @proot@("ssn",x,ien)="" "RTN","SAMIHOM4",965,0) s x=$g(@proot@(ien,"sinamef")) ;w !,x "RTN","SAMIHOM4",966,0) s:x'="" @proot@("sinamef",x,ien)="" "RTN","SAMIHOM4",967,0) s x=$g(@proot@(ien,"sinamel")) w !,x "RTN","SAMIHOM4",968,0) s:x'="" @proot@("sinamel",x,ien)="" "RTN","SAMIHOM4",969,0) set @proot@("Date Last Updated")=$$HTE^XLFDT($horolog) "RTN","SAMIHOM4",970,0) ; "RTN","SAMIHOM4",971,0) quit ; end of INDXPTLK "RTN","SAMIHOM4",972,0) ; "RTN","SAMIHOM4",973,0) ; "RTN","SAMIHOM4",974,0) ; "RTN","SAMIHOM4",975,0) UNINDXPT(ien) ; remove index entries from patient-lookup graph "RTN","SAMIHOM4",976,0) ; "RTN","SAMIHOM4",977,0) ; for entry ien "RTN","SAMIHOM4",978,0) ; "RTN","SAMIHOM4",979,0) n proot set proot=$$setroot^%wd("patient-lookup") "RTN","SAMIHOM4",980,0) n name s name=$g(@proot@(ien,"saminame")) "RTN","SAMIHOM4",981,0) k @proot@("name",name,ien) "RTN","SAMIHOM4",982,0) n ucname s ucname=$$UCASE(name) "RTN","SAMIHOM4",983,0) k @proot@("name",ucname,ien) "RTN","SAMIHOM4",984,0) n x "RTN","SAMIHOM4",985,0) s x=$g(@proot@(ien,"dfn")) ;w !,x "RTN","SAMIHOM4",986,0) k:x'="" @proot@("dfn",x,ien) "RTN","SAMIHOM4",987,0) s x=$g(@proot@(ien,"last5")) ;w !,x "RTN","SAMIHOM4",988,0) k:x'="" @proot@("last5",x,ien) "RTN","SAMIHOM4",989,0) ; "RTN","SAMIHOM4",990,0) ; s x=$g(@proot@(ien,"icn")) ;w !,x "RTN","SAMIHOM4",991,0) ; i x'["V" d ; "RTN","SAMIHOM4",992,0) ; . i x="" q "RTN","SAMIHOM4",993,0) ; . n chk s chk=$$CHECKDG^MPIFSPC(x) "RTN","SAMIHOM4",994,0) ; . s @proot@(ien,"icn")=x_"V"_chk "RTN","SAMIHOM4",995,0) ; . s x=x_"V"_chk "RTN","SAMIHOM4",996,0) ; k:x'="" @proot@("icn",x,ien) "RTN","SAMIHOM4",997,0) ; "RTN","SAMIHOM4",998,0) s x=$g(@proot@(ien,"ssn")) ;w !,x "RTN","SAMIHOM4",999,0) k:x'="" @proot@("ssn",x,ien) "RTN","SAMIHOM4",1000,0) s x=$g(@proot@(ien,"sinamef")) ;w !,x "RTN","SAMIHOM4",1001,0) k:x'="" @proot@("sinamef",x,ien) "RTN","SAMIHOM4",1002,0) s x=$g(@proot@(ien,"sinamel")) w !,x "RTN","SAMIHOM4",1003,0) k:x'="" @proot@("sinamel",x,ien) "RTN","SAMIHOM4",1004,0) set @proot@("Date Last Updated")=$$HTE^XLFDT($horolog) "RTN","SAMIHOM4",1005,0) ; "RTN","SAMIHOM4",1006,0) quit ; end of UNINDXPT "RTN","SAMIHOM4",1007,0) ; "RTN","SAMIHOM4",1008,0) ; "RTN","SAMIHOM4",1009,0) ; "RTN","SAMIHOM4",1010,0) UCASE(STR) ; extrinsic returns uppercase of STR "RTN","SAMIHOM4",1011,0) ; "RTN","SAMIHOM4",1012,0) N X,Y "RTN","SAMIHOM4",1013,0) S X=STR "RTN","SAMIHOM4",1014,0) X ^%ZOSF("UPPERCASE") "RTN","SAMIHOM4",1015,0) ; "RTN","SAMIHOM4",1016,0) quit Y ; end of $$UCASE "RTN","SAMIHOM4",1017,0) ; "RTN","SAMIHOM4",1018,0) ; "RTN","SAMIHOM4",1019,0) ; "RTN","SAMIHOM4",1020,0) ;@wri-code WSNEWCAS^SAMIHOM3 "RTN","SAMIHOM4",1021,0) WSNEWCAS ; web route newcase (creates new case) "RTN","SAMIHOM4",1022,0) ; "RTN","SAMIHOM4",1023,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIHOM4",1024,0) ; "RTN","SAMIHOM4",1025,0) ;ven/gpl;wri;procedure; "RTN","SAMIHOM4",1026,0) ;@signature "RTN","SAMIHOM4",1027,0) ; do WSNEWCAS^SAMIHOM3(SAMIARGS,SAMIBODY,SAMIRESULT) "RTN","SAMIHOM4",1028,0) ;@branches-from "RTN","SAMIHOM4",1029,0) ; wri WSNEWCAS^SAMIHOM3 [wr newcase] "RTN","SAMIHOM4",1030,0) ;@wri-called-by "RTN","SAMIHOM4",1031,0) ; wsi WSVAPALS^SAMIHOM3 [ws post vapals] "RTN","SAMIHOM4",1032,0) ;@called-by none "RTN","SAMIHOM4",1033,0) ;@calls "RTN","SAMIHOM4",1034,0) ; parseBody^%wf "RTN","SAMIHOM4",1035,0) ; $$setroot^%wd "RTN","SAMIHOM4",1036,0) ; $$VALDTNM [commented out] "RTN","SAMIHOM4",1037,0) ; GETHOME [commented out] "RTN","SAMIHOM4",1038,0) ; $$NEXTNUM [commented out] "RTN","SAMIHOM4",1039,0) ; $$GENSTDID^SAMIHOM3 "RTN","SAMIHOM4",1040,0) ; $$NOW^XLFDT "RTN","SAMIHOM4",1041,0) ; $$KEYDATE^SAMIHOM3 "RTN","SAMIHOM4",1042,0) ; PREFILL^SAMIHOM3 "RTN","SAMIHOM4",1043,0) ; makeSbform [commented out] "RTN","SAMIHOM4",1044,0) ; $$MKSIFORM^SAMIHOM3 "RTN","SAMIHOM4",1045,0) ; wsGetForm^%wf "RTN","SAMIHOM4",1046,0) ; WSCASE^SAMICASE [commented out] "RTN","SAMIHOM4",1047,0) ;@input "RTN","SAMIHOM4",1048,0) ;.ARGS = "RTN","SAMIHOM4",1049,0) ; BODY = "RTN","SAMIHOM4",1050,0) ;.RESULT = "RTN","SAMIHOM4",1051,0) ;@output: ? "RTN","SAMIHOM4",1052,0) ;@examples [tbd] "RTN","SAMIHOM4",1053,0) ;@tests [tbd] "RTN","SAMIHOM4",1054,0) ; "RTN","SAMIHOM4",1055,0) ; "RTN","SAMIHOM4",1056,0) ;@stanza 2 create new case "RTN","SAMIHOM4",1057,0) ; "RTN","SAMIHOM4",1058,0) merge ^SAMIUL("newCase","ARGS")=SAMIARGS "RTN","SAMIHOM4",1059,0) merge ^SAMIUL("newCase","BODY")=SAMIBODY "RTN","SAMIHOM4",1060,0) ; "RTN","SAMIHOM4",1061,0) new vars,bdy "RTN","SAMIHOM4",1062,0) set SAMIBDY=$get(SAMIBODY(1)) "RTN","SAMIHOM4",1063,0) do parseBody^%wf("vars",.SAMIBDY) "RTN","SAMIHOM4",1064,0) merge ^SAMIUL("newCase","vars")=vars "RTN","SAMIHOM4",1065,0) ; "RTN","SAMIHOM4",1066,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIHOM4",1067,0) ; "RTN","SAMIHOM4",1068,0) new saminame set saminame=$get(vars("name")) "RTN","SAMIHOM4",1069,0) if saminame="" s saminame=$get(vars("saminame")) "RTN","SAMIHOM4",1070,0) ;if $$VALDTNM(saminame,.ARGS)=-1 do quit ; "RTN","SAMIHOM4",1071,0) ;. new r1 "RTN","SAMIHOM4",1072,0) ;. do GETHOME(.r1,.ARGS) ; home page to redisplay "RTN","SAMIHOM4",1073,0) ;. merge RESULT=r1 "RTN","SAMIHOM4",1074,0) ;. quit "RTN","SAMIHOM4",1075,0) ; "RTN","SAMIHOM4",1076,0) new dfn s dfn=$get(vars("dfn")) "RTN","SAMIHOM4",1077,0) ;if dfn="" do quit ; "RTN","SAMIHOM4",1078,0) ;. new r1 "RTN","SAMIHOM4",1079,0) ;. do GETHOME(.r1,.ARGS) ; home page to redisplay "RTN","SAMIHOM4",1080,0) ;. merge RESULT=r1 "RTN","SAMIHOM4",1081,0) ;. quit "RTN","SAMIHOM4",1082,0) ; "RTN","SAMIHOM4",1083,0) ; new gien set gien=$$NEXTNUM "RTN","SAMIHOM4",1084,0) new gien set gien=dfn "RTN","SAMIHOM4",1085,0) ; "RTN","SAMIHOM4",1086,0) merge ^SAMIUL("newCase","G1")=root "RTN","SAMIHOM4",1087,0) ; create dfn index "RTN","SAMIHOM4",1088,0) set @root@("dfn",dfn,gien)="" "RTN","SAMIHOM4",1089,0) ; "RTN","SAMIHOM4",1090,0) set @root@(gien,"saminum")=gien "RTN","SAMIHOM4",1091,0) set @root@(gien,"saminame")=saminame "RTN","SAMIHOM4",1092,0) ; "RTN","SAMIHOM4",1093,0) new studyid set studyid=$$GENSTDID^SAMIHOM3(gien,.SAMIARGS) "RTN","SAMIHOM4",1094,0) set @root@(gien,"samistudyid")=studyid "RTN","SAMIHOM4",1095,0) set @root@("sid",studyid,gien)="" "RTN","SAMIHOM4",1096,0) ; "RTN","SAMIHOM4",1097,0) new datekey set datekey=$$KEYDATE^SAMIHOM3($$NOW^XLFDT) "RTN","SAMIHOM4",1098,0) set @root@(gien,"samicreatedate")=datekey "RTN","SAMIHOM4",1099,0) ; "RTN","SAMIHOM4",1100,0) merge ^SAMIUL("newCase",gien)=@root@(gien) "RTN","SAMIHOM4",1101,0) ; "RTN","SAMIHOM4",1102,0) ; "RTN","SAMIHOM4",1103,0) do PREFILL^SAMIHOM3(dfn) ; prefills from the "patient-lookup" graph "RTN","SAMIHOM4",1104,0) ; "RTN","SAMIHOM4",1105,0) new siformkey "RTN","SAMIHOM4",1106,0) ; do makeSbform(gien) ; create background form for new patient "RTN","SAMIHOM4",1107,0) set siformkey=$$MKSIFORM^SAMIHOM3(gien) ; create intake for new patient "RTN","SAMIHOM4",1108,0) ; "RTN","SAMIHOM4",1109,0) set SAMIARGS("studyid")=studyid "RTN","SAMIHOM4",1110,0) set SAMIARGS("form")="vapals:"_siformkey "RTN","SAMIHOM4",1111,0) do wsGetForm^%wf(.SAMIRESULT,.SAMIARGS) "RTN","SAMIHOM4",1112,0) ; do WSCASE^SAMICASE(.SAMIRESULT,.SAMIARGS) ; navigate to case review page "RTN","SAMIHOM4",1113,0) ; "RTN","SAMIHOM4",1114,0) ; "RTN","SAMIHOM4",1115,0) ;@stanza 3 termination "RTN","SAMIHOM4",1116,0) ; "RTN","SAMIHOM4",1117,0) quit ; end of wri WSNEWCAS^SAMIHOM3 "RTN","SAMIHOM4",1118,0) ; "RTN","SAMIHOM4",1119,0) ; "RTN","SAMIHOM4",1120,0) ; "RTN","SAMIHOM4",1121,0) EOR ; end of routine SAMIHOM4 "RTN","SAMIHUL") 0^8^B121785 "RTN","SAMIHUL",1,0) SAMIHUL ;ven/gpl - ielcap: home page log ;2021-07-01t16:19z "RTN","SAMIHUL",2,0) ;;18.0;SAMI;**9,12**;;Build 6 "RTN","SAMIHUL",3,0) ;;1.18.0.12-t3+i12 "RTN","SAMIHUL",4,0) ; "RTN","SAMIHUL",5,0) ; SAMIHOME contains subroutines for producing the ELCAP Home Page. "RTN","SAMIHUL",6,0) ; SAMIHUL contains the development log for the SAMIHOM* routines. "RTN","SAMIHUL",7,0) ; It contains no executable code. "RTN","SAMIHUL",8,0) ; "RTN","SAMIHUL",9,0) quit ; no entry from top "RTN","SAMIHUL",10,0) ; "RTN","SAMIHUL",11,0) ; "RTN","SAMIHUL",12,0) ; "RTN","SAMIHUL",13,0) ;@section 0 primary development "RTN","SAMIHUL",14,0) ; "RTN","SAMIHUL",15,0) ; "RTN","SAMIHUL",16,0) ; "RTN","SAMIHUL",17,0) ;@routine-credits "RTN","SAMIHUL",18,0) ;@primary-dev George P. Lilly (gpl) "RTN","SAMIHUL",19,0) ; gpl@vistaexpertise.net "RTN","SAMIHUL",20,0) ;@primary-dev-org Vista Expertise Network (ven) "RTN","SAMIHUL",21,0) ; http://vistaexpertise.net "RTN","SAMIHUL",22,0) ;@copyright 2017/2021, gpl, all rights reserved "RTN","SAMIHUL",23,0) ;@license see routine SAMIUL "RTN","SAMIHUL",24,0) ; "RTN","SAMIHUL",25,0) ;@last-updated 2021-07-01t16:19z "RTN","SAMIHUL",26,0) ;@application Screening Applications Management (SAM) "RTN","SAMIHUL",27,0) ;@module Screening Applications Management - IELCAP (SAMI) "RTN","SAMIHUL",28,0) ;@suite-of-files SAMI Forms (311.101-311.199) "RTN","SAMIHUL",29,0) ;@version 1.18.0.12-t3+i12 "RTN","SAMIHUL",30,0) ;@release-date 2020-01 "RTN","SAMIHUL",31,0) ;@patch-list **9,12** "RTN","SAMIHUL",32,0) ; "RTN","SAMIHUL",33,0) ;@additional-dev Frederick D. S. Marshall (toad) "RTN","SAMIHUL",34,0) ; toad@vistaexpertise.net "RTN","SAMIHUL",35,0) ;@additional-dev Kenneth W. McGlothlen (mcglk) "RTN","SAMIHUL",36,0) ; mcglk@vistaexpertise.net "RTN","SAMIHUL",37,0) ;@additional-dev Linda M. R. Yaw (lmry) "RTN","SAMIHUL",38,0) ; linda.yaw@vistaexpertise.net "RTN","SAMIHUL",39,0) ;@additional-dev Larry G. Carlson (lgc) "RTN","SAMIHUL",40,0) ; larry.g.carlson@gmail.com "RTN","SAMIHUL",41,0) ;@additional-dev Alexis R. Carlson (arc) "RTN","SAMIHUL",42,0) ; whatisthehumanspirit@gmail.com "RTN","SAMIHUL",43,0) ;@additional-dev Domenick DiNatale (ddn) "RTN","SAMIHUL",44,0) ; domenic@intellitechinnovations.com "RTN","SAMIHUL",45,0) ; "RTN","SAMIHUL",46,0) ;@module-credits "RTN","SAMIHUL",47,0) ;@project VA Partnership to Increase Access to Lung Screening "RTN","SAMIHUL",48,0) ; (VA-PALS) "RTN","SAMIHUL",49,0) ; http://va-pals.org/ "RTN","SAMIHUL",50,0) ;@funding 2017/2021, Bristol-Myers Squibb Foundation (bmsf) "RTN","SAMIHUL",51,0) ; https://www.bms.com/about-us/responsibility/bristol-myers-squibb-foundation.html "RTN","SAMIHUL",52,0) ;@partner-org Veterans Affairs Office of Rural health "RTN","SAMIHUL",53,0) ; https://www.ruralhealth.va.gov/ "RTN","SAMIHUL",54,0) ;@partner-org International Early Lung Cancer Action Program (I-ELCAP) "RTN","SAMIHUL",55,0) ; http://ielcap.com/ "RTN","SAMIHUL",56,0) ;@partner-org Paraxial Technologies (par) "RTN","SAMIHUL",57,0) ; http://paraxialtech.com/ "RTN","SAMIHUL",58,0) ;@partner-org Open Source Electronic Health Record Alliance (OSEHRA) "RTN","SAMIHUL",59,0) ; https://www.osehra.org/groups/va-pals-open-source-project-group "RTN","SAMIHUL",60,0) ; "RTN","SAMIHUL",61,0) ;@module-log repo github.com:VA-PALS-ELCAP/SAMI-VAPALS-ELCAP.git "RTN","SAMIHUL",62,0) ; "RTN","SAMIHUL",63,0) ; 2018-01-13 ven/gpl 1.18.0-t4 "RTN","SAMIHUL",64,0) ; SAMIHOM3: create routine from SAMIFRM to implement ELCAP Home Page. "RTN","SAMIHUL",65,0) ; "RTN","SAMIHUL",66,0) ; 2018-02-05 ven/toad 1.18.0-t4 "RTN","SAMIHUL",67,0) ; SAMIHOM3: update license & attribution & hdr comments, add white "RTN","SAMIHUL",68,0) ; space & do-dot quits, spell out language elements. "RTN","SAMIHUL",69,0) ; "RTN","SAMIHUL",70,0) ; 2018-02-27 ven/gpl 1.18.0-t4 "RTN","SAMIHUL",71,0) ; SAMIHOM3: new subroutines PREFIX,GETHOME,SCANFOR,WSNEWCAS,PREFILL, "RTN","SAMIHUL",72,0) ; MKSBFORM,MKSIFORM,VALDTNM,SID2NUM,KEYDATE,GENSTDID,NEXTNUM to "RTN","SAMIHUL",73,0) ; support creation of new cases. "RTN","SAMIHUL",74,0) ; "RTN","SAMIHUL",75,0) ; 2018-03-01 ven/toad 1.18.0-t4 "RTN","SAMIHUL",76,0) ; SAMIHOM3 refactor & reorganize new code, add hdr comments, "RTN","SAMIHUL",77,0) ; r/findReplaceAll^%wf w/findReplace^%ts. "RTN","SAMIHUL",78,0) ; "RTN","SAMIHUL",79,0) ; 2018-03-06 ven/gpl 1.18.0-t4 "RTN","SAMIHUL",80,0) ; SAMIHOM3: ? "RTN","SAMIHUL",81,0) ; "RTN","SAMIHUL",82,0) ; 2018-03-07 ven/toad 1.18.0-t4 "RTN","SAMIHUL",83,0) ; SAMIHOM3: in $$SID2NUM add WSNUFORM^SAMICASE to called-by; in "RTN","SAMIHUL",84,0) ; keyDate,GETHOME update called-by. "RTN","SAMIHUL",85,0) ; "RTN","SAMIHUL",86,0) ; 2018-05-18/25 ven/lgc&arc 1.18.0-t4 76020fd,81b1048,65afd99 "RTN","SAMIHUL",87,0) ; SAMIHOM3: new SAMIHOM3 for new patient search page, chg submit "RTN","SAMIHUL",88,0) ; processing on forms, fix bug in postform. "RTN","SAMIHUL",89,0) ; "RTN","SAMIHUL",90,0) ; 2018-06-14/07-10 ven/lgc&arc 1.18.0-t4 d71f4fe,8b0a432,ce345db, "RTN","SAMIHUL",91,0) ; 402b6a8,14f991d,2e9662b "RTN","SAMIHUL",92,0) ; SAMIHOM3: make background form optional; 1st version of CT Eval "RTN","SAMIHUL",93,0) ; Report; reorg ctreport routines & 1st crack at impressions & "RTN","SAMIHUL",94,0) ; recommendations; note produced for intake form on submit; add "RTN","SAMIHUL",95,0) ; support for routing by patient in CPRS Tools Menu, modify "RTN","SAMIHUL",96,0) ; wsHOME^SAMIHOM3 to properly route VA-PALS web app when launced via "RTN","SAMIHUL",97,0) ; CPRS Tools Menu; repair SAMIHOM3 & redact report link. "RTN","SAMIHUL",98,0) ; "RTN","SAMIHUL",99,0) ; 2018-08-22 ven/gpl 1.18.0-t4 6e696a9 "RTN","SAMIHUL",100,0) ; SAMIHOM3: add PTINFO call to vista to pull ssn. "RTN","SAMIHUL",101,0) ; "RTN","SAMIHUL",102,0) ; 2018-09-30/11-01 ven/lgc&arc 1.18.0-t4 d93c640,482f522,a8e4226, "RTN","SAMIHUL",103,0) ; ee5e8a1 "RTN","SAMIHUL",104,0) ; SAMIHOM3: hdr & prefill of intake; new input form features, report "RTN","SAMIHUL",105,0) ; menu fix; set urban/rural status at siform setup; handle zip code "RTN","SAMIHUL",106,0) ; unknown. "RTN","SAMIHUL",107,0) ; "RTN","SAMIHUL",108,0) ; 2018-11-09/2019-01-22 ven/lgc&arc&lmry 1.18.0-t4 bac4f73,5400035, "RTN","SAMIHUL",109,0) ; dd341e0,a953946,e2a44e6,2356c2b,3ceb74b,3088307,4271b46,7a5d340, "RTN","SAMIHUL",110,0) ; dfbb0bc,fd1bcee,8dd6f34,51eb163,dbdb5a4,0880027,ccba017,5368121 "RTN","SAMIHUL",111,0) ; SAMIHOM3: unit tests, annotation, sac compliance, XINDEX bugs, fix "RTN","SAMIHUL",112,0) ; accidental reversions, add license info. "RTN","SAMIHUL",113,0) ; "RTN","SAMIHUL",114,0) ; 2018-12-18/20 ven/arc 1.18.0-t04 3088307f,4271b46b,dfbb0bca, "RTN","SAMIHUL",115,0) ; b8ff6da9,fd1bceee "RTN","SAMIHUL",116,0) ; SAMIHOM4: va sac compliance & variable namespacing. "RTN","SAMIHUL",117,0) ; "RTN","SAMIHUL",118,0) ; 2019-01-01/02-18 ven/lgc 1.18.0-t04 0880027c,18aa0fec,fcd635c1, "RTN","SAMIHUL",119,0) ; 53681219,76874314 "RTN","SAMIHUL",120,0) ; SAMIHOM3: update w/ recent changes. "RTN","SAMIHUL",121,0) ; SAMIHOM4: updates for va sac & code coverage, add license info. "RTN","SAMIHUL",122,0) ; "RTN","SAMIHUL",123,0) ; 2019-04-15 ven/gpl 1.18.0-t04 b403bf01 "RTN","SAMIHUL",124,0) ; SAMIHOM4: support for new intake notes. "RTN","SAMIHUL",125,0) ; "RTN","SAMIHUL",126,0) ; 2019-04-16 ven/lgc 1.18.0-t04 e54b76d1 "RTN","SAMIHUL",127,0) ; SAMIHOM4: update for SAMIFORM project. "RTN","SAMIHUL",128,0) ; "RTN","SAMIHUL",129,0) ; 2019-04-17 ven/gpl 1.18.0-t4 7d1f86db "RTN","SAMIHUL",130,0) ; SAMIHOM3: prefill date on intake prelim discussion section. "RTN","SAMIHUL",131,0) ; "RTN","SAMIHUL",132,0) ; 2019-06-18 ven/arc 1.18.0-t04 91022482 "RTN","SAMIHUL",133,0) ; SAMIHOM4: switch fr/global ^SAMIGPL to/^SAMIUL. "RTN","SAMIHUL",134,0) ; "RTN","SAMIHUL",135,0) ; 2019-08-05 ven/gpl 1.18.0-t4 9c0c2ed3 "RTN","SAMIHUL",136,0) ; SAMIHOM3: add GETPRFX to get right prefix at registration. "RTN","SAMIHUL",137,0) ; "RTN","SAMIHUL",138,0) ; 2019-08-07 ven/lgc&arc 1.18.0-t4 603194b9,37967fc5 "RTN","SAMIHUL",139,0) ; SAMIHOM3: consolidate calls to retrieve facility prefix. "RTN","SAMIHUL",140,0) ; "RTN","SAMIHUL",141,0) ; 2019-11-22 par/ddn 1.18.0-t04 b2cc389d vap-458 "RTN","SAMIHUL",142,0) ; SAMIHOM4: manual registration. "RTN","SAMIHUL",143,0) ; "RTN","SAMIHUL",144,0) ; 2020-01-01/05 ven/lgc 1.18.0 c169f4b1,5928064a,62e3200f "RTN","SAMIHUL",145,0) ; SAMIHOM4: support for unmatched patient processing, more changes "RTN","SAMIHUL",146,0) ; for participant matching, unmatched participant processing ready "RTN","SAMIHUL",147,0) ; for testing. "RTN","SAMIHUL",148,0) ; "RTN","SAMIHUL",149,0) ; 2020-01-08/10 ven/gpl 1.18.0 a002f850,47dfe3cd "RTN","SAMIHUL",150,0) ; SAMIHOM4: bug fix for unmatched processing, turn off & on manual "RTN","SAMIHUL",151,0) ; registration link on home page. "RTN","SAMIHUL",152,0) ; "RTN","SAMIHUL",153,0) ; 2020-01-10 ven/gpl 1.18.0 4c8e6ebc,76b465cb "RTN","SAMIHUL",154,0) ; SAMIHOM4: 3 quits with returns for cache. "RTN","SAMIHUL",155,0) ; "RTN","SAMIHUL",156,0) ; 2020-01-16 ven/lgc 1.18.0 0a2af965 "RTN","SAMIHUL",157,0) ; SAMIHOM4: bulk commit due to switch to cache. "RTN","SAMIHUL",158,0) ; "RTN","SAMIHUL",159,0) ; 2020-01-17/20 ven/lgc 1.18.0.1+i1 8557207f,dc5f618c "RTN","SAMIHUL",160,0) ; SAMIHOM4: followup note, limit to one note per followup form. "RTN","SAMIHUL",161,0) ; "RTN","SAMIHUL",162,0) ; 2020-02-01/02 ven/lgc 1.18.0.4+i4 3065146d,36ae0ed1 "RTN","SAMIHUL",163,0) ; SAMIHOM4: set options for text based ctreport, switch default "RTN","SAMIHUL",164,0) ; ctreport to text. "RTN","SAMIHUL",165,0) ; "RTN","SAMIHUL",166,0) ; 2020-04-02/11 ven/gpl 1.18.0.5+i5 d36b7cad,36607664,befde317, "RTN","SAMIHUL",167,0) ; 56bfaed6,666f5b91,2f2c29c1 "RTN","SAMIHUL",168,0) ; SAMIHOM3: multitenancy; in GENSTDID add ARG param, determin prefix "RTN","SAMIHUL",169,0) ; from site or siteid (ARG) instead of calling $$GETPRFX^SAMIFORM. "RTN","SAMIHUL",170,0) ; SAMIHOM4: multitenancy + fix bug in WSVAPALS. "RTN","SAMIHUL",171,0) ; "RTN","SAMIHUL",172,0) ; 2020-04-18/05-07 ven/gpl 1.18.0.5+i5 29d7dba7,d55de214,521e0bdc, "RTN","SAMIHUL",173,0) ; d018f52e,476b2ff4,61c7d208 "RTN","SAMIHUL",174,0) ; SAMIHOM4: fix bug & weird error in manual registration, fix bug in "RTN","SAMIHUL",175,0) ; logout, logout working, superuser site selection, worklist "RTN","SAMIHUL",176,0) ; functionality. "RTN","SAMIHUL",177,0) ; "RTN","SAMIHUL",178,0) ; 2020-08-06 ven/gpl 1.18.0.6+i6 781744c3 "RTN","SAMIHUL",179,0) ; SAMIHOM4: changes to support hl7 transmission of notes. "RTN","SAMIHUL",180,0) ; "RTN","SAMIHUL",181,0) ; 2020-09-22 ven/gpl 1.18.0.9+i9 06459eda "RTN","SAMIHUL",182,0) ; SAMIHOM4: correct to match kids file. "RTN","SAMIHUL",183,0) ; "RTN","SAMIHUL",184,0) ; 2021-03-02 ven/gpl 1.18.0.9+i9 479dc041 "RTN","SAMIHUL",185,0) ; SAMIHOM4: return error message if no ct eval form exists when "RTN","SAMIHUL",186,0) ; generating a fu note. "RTN","SAMIHUL",187,0) ; "RTN","SAMIHUL",188,0) ; 2021-03-11 ven/toad 1.18.0.9+i9 a46a2cc1 "RTN","SAMIHUL",189,0) ; SAMIHUL: create routine. "RTN","SAMIHUL",190,0) ; SAMIHOM4: bump date & patch list, add contents, lt refactor. "RTN","SAMIHUL",191,0) ; "RTN","SAMIHUL",192,0) ; 2021-03-17 ven/toad 1.18.0.9+i9 "RTN","SAMIHUL",193,0) ; SAMIHOM4: remove blank from end of 1 line. "RTN","SAMIHUL",194,0) ; "RTN","SAMIHUL",195,0) ; 2021-05-29 ven/gpl 1.18.0.12-t2+i12 59ea0811 "RTN","SAMIHUL",196,0) ; SAMIHOM3: in SID2NUM look up by pien instead of relying on sid "RTN","SAMIHUL",197,0) ; containing pien. "RTN","SAMIHUL",198,0) ; "RTN","SAMIHUL",199,0) ; 2021-06-15 ven/gpl 1.18.0.12-t2+i12 e247ea59 "RTN","SAMIHUL",200,0) ; SAMIHOM4: eliminate icn. "RTN","SAMIHUL",201,0) ; "RTN","SAMIHUL",202,0) ; 2021-06-15/16 ven/mcglk&toad 1.18.0.12-t2+i12 cbf7e46b,fa794d60 "RTN","SAMIHUL",203,0) ; SAMIHOM3 move log to SAMIHUL, bump dates & versions, annotate, "RTN","SAMIHUL",204,0) ; reorg, lt refactor. "RTN","SAMIHUL",205,0) ; SAMIHOM4 bump dates & versions; begin annotate, reorg, lt refactor "RTN","SAMIHUL",206,0) ; but interrupted by addition of critical fix to patch & bronchitis, "RTN","SAMIHUL",207,0) ; so leave refactor unfinished (but stable as far as it went). "RTN","SAMIHUL",208,0) ; SAMIUTH3 bump dates & versions, lt refactor, add COVER, in UTSCAN4 "RTN","SAMIHUL",209,0) ; fix $random bug, but after discovering the SAMI test suite is so "RTN","SAMIHUL",210,0) ; far out of date that it fails catastrophically with thousands of "RTN","SAMIHUL",211,0) ; errors, back out changes and leave as it was. "RTN","SAMIHUL",212,0) ; "RTN","SAMIHUL",213,0) ;@contents "RTN","SAMIHUL",214,0) ; SAMIHOM3 homepage interface library "RTN","SAMIHUL",215,0) ; SAMIHOM4 homepage subroutines "RTN","SAMIHUL",216,0) ; SAMIHUL homepage development log "RTN","SAMIHUL",217,0) ; SAMIUTH3 tests for SAMIHOM3 "RTN","SAMIHUL",218,0) ; SAMIUTH4 tests for SAMIHOM4 "RTN","SAMIHUL",219,0) ; "RTN","SAMIHUL",220,0) ; "RTN","SAMIHUL",221,0) ; "RTN","SAMIHUL",222,0) EOR ; end of routine SAMIHUL "RTN","SAMIJS1") 0^9^B33800885 "RTN","SAMIJS1",1,0) SAMIJS1 ;ven/gpl - json archive export ;2021-07-01t16:58z "RTN","SAMIJS1",2,0) ;;18.0;SAMI;**8,12**;2020-01;Build 6 "RTN","SAMIJS1",3,0) ;;1.18.0.12-t3+i12 "RTN","SAMIJS1",4,0) ; "RTN","SAMIJS1",5,0) ; Routine SAMIJS1 contains subroutines for exporting VAPALS-ELCAP "RTN","SAMIJS1",6,0) ; JSON archives, which are used for import, export, & migration of "RTN","SAMIJS1",7,0) ; SAMI data. "RTN","SAMIJS1",8,0) ; "RTN","SAMIJS1",9,0) quit ; no entry from top "RTN","SAMIJS1",10,0) ; "RTN","SAMIJS1",11,0) ; "RTN","SAMIJS1",12,0) ; "RTN","SAMIJS1",13,0) ;@section 0 primary development "RTN","SAMIJS1",14,0) ; "RTN","SAMIJS1",15,0) ; "RTN","SAMIJS1",16,0) ; "RTN","SAMIJS1",17,0) ;@routine-credits "RTN","SAMIJS1",18,0) ;@primary-dev George P. Lilly (gpl) "RTN","SAMIJS1",19,0) ; gpl@vistaexpertise.net "RTN","SAMIJS1",20,0) ;@primary-dev-org Vista Expertise Network (ven) "RTN","SAMIJS1",21,0) ; http://vistaexpertise.net "RTN","SAMIJS1",22,0) ;@copyright 2017/2021, gpl, all rights reserved "RTN","SAMIJS1",23,0) ;@license see routine SAMIUL "RTN","SAMIJS1",24,0) ; "RTN","SAMIJS1",25,0) ;@last-updated 2021-07-01t16:58z "RTN","SAMIJS1",26,0) ;@application Screening Applications Management (SAM) "RTN","SAMIJS1",27,0) ;@module Screening Applications Management - IELCAP (SAMI) "RTN","SAMIJS1",28,0) ;@suite-of-files SAMI Forms (311.101-311.199) "RTN","SAMIJS1",29,0) ;@version 1.18.0.12-t3+i12 "RTN","SAMIJS1",30,0) ;@release-date 2020-01 "RTN","SAMIJS1",31,0) ;@patch-list **8,12** "RTN","SAMIJS1",32,0) ; "RTN","SAMIJS1",33,0) ;@additional-dev Frederick D. S. Marshall (toad) "RTN","SAMIJS1",34,0) ; toad@vistaexpertise.net "RTN","SAMIJS1",35,0) ;@additional-dev Kenneth W. McGlothlen (mcglk) "RTN","SAMIJS1",36,0) ; mcglk@vistaexpertise.net "RTN","SAMIJS1",37,0) ; "RTN","SAMIJS1",38,0) ;@routine-log repo github.com:VA-PALS-ELCAP/SAMI-VAPALS-ELCAP.git "RTN","SAMIJS1",39,0) ; 2020-12-11 ven/gpl 1.18.0.8+i8 0c73272b,92138cdb "RTN","SAMIJS1",40,0) ; SAMIJS1 initial data migration export, add DETAIL^SAMIJS1 for "RTN","SAMIJS1",41,0) ; debugging. "RTN","SAMIJS1",42,0) ; "RTN","SAMIJS1",43,0) ; 2021-05-29 ven/gpl 1.18.0.12-t2+i12 0a3b184f "RTN","SAMIJS1",44,0) ; SAMIJS1,SAMIJS2 update data migration routines; new SAMIJS2. "RTN","SAMIJS1",45,0) ; "RTN","SAMIJS1",46,0) ; 2021-07-01 ven/mcglk&toad 1.18.0.12-t2+i12 cbf7e46b "RTN","SAMIJS1",47,0) ; SAMIJS1,SAMIJS2 bump version & dates, add hdr comments & dev log. "RTN","SAMIJS1",48,0) ; "RTN","SAMIJS1",49,0) ;@contents "RTN","SAMIJS1",50,0) ; EN ??? "RTN","SAMIJS1",51,0) ; EXSITE ??? "RTN","SAMIJS1",52,0) ; $$dfn2lien lookup ien of patient dfn "RTN","SAMIJS1",53,0) ; $$dfn2pien patient graph ien of patient dfn "RTN","SAMIJS1",54,0) ; $$getaien ien for patient dfn in vapals-archive "RTN","SAMIJS1",55,0) ; mkarch create archive record for patient dfn "RTN","SAMIJS1",56,0) ; outarch write archive record to external file "RTN","SAMIJS1",57,0) ; DETAIL display archive record for patient "RTN","SAMIJS1",58,0) ; "RTN","SAMIJS1",59,0) ; "RTN","SAMIJS1",60,0) ; "RTN","SAMIJS1",61,0) ;@section 1 subroutines "RTN","SAMIJS1",62,0) ; "RTN","SAMIJS1",63,0) ; "RTN","SAMIJS1",64,0) ; "RTN","SAMIJS1",65,0) EN ; "RTN","SAMIJS1",66,0) n site,dfn,pat "RTN","SAMIJS1",67,0) s site=$$PICSITE^SAMIMOV() "RTN","SAMIJS1",68,0) q:site="^" "RTN","SAMIJS1",69,0) d PICPAT^SAMIMOV(.pat,site) "RTN","SAMIJS1",70,0) w " ",$g(pat("name")) "RTN","SAMIJS1",71,0) s dfn=$g(pat("dfn")) "RTN","SAMIJS1",72,0) w !,"dfn=",dfn "RTN","SAMIJS1",73,0) d mkarch(dfn) "RTN","SAMIJS1",74,0) d outarch(dfn) "RTN","SAMIJS1",75,0) q "RTN","SAMIJS1",76,0) ; "RTN","SAMIJS1",77,0) ; "RTN","SAMIJS1",78,0) ; "RTN","SAMIJS1",79,0) EXSITE ; "RTN","SAMIJS1",80,0) n site,dfn,pat "RTN","SAMIJS1",81,0) s site=$$PICSITE^SAMIMOV() "RTN","SAMIJS1",82,0) q:site="^" "RTN","SAMIJS1",83,0) n lroot,proot,aroot "RTN","SAMIJS1",84,0) s lroot=$$setroot^%wd("patient-lookup") "RTN","SAMIJS1",85,0) s proot=$$setroot^%wd("vapals-patients") "RTN","SAMIJS1",86,0) s aroot=$$setroot^%wd("vapals-archive") "RTN","SAMIJS1",87,0) n dfn,lien s dfn="" "RTN","SAMIJS1",88,0) f s dfn=$o(@lroot@("dfn",dfn)) q:+dfn=0 d ; "RTN","SAMIJS1",89,0) . s lien=$o(@lroot@("dfn",dfn,"")) "RTN","SAMIJS1",90,0) . i $g(@lroot@(lien,"siteid"))'=site q ; "RTN","SAMIJS1",91,0) . d mkarch(dfn) "RTN","SAMIJS1",92,0) . d outarch(dfn) "RTN","SAMIJS1",93,0) q "RTN","SAMIJS1",94,0) ; "RTN","SAMIJS1",95,0) ; "RTN","SAMIJS1",96,0) ; "RTN","SAMIJS1",97,0) dfn2lien(dfn) ; extrinsic return the lookup ien of patient dfn "RTN","SAMIJS1",98,0) n lroot,lien "RTN","SAMIJS1",99,0) s lroot=$$setroot^%wd("patient-lookup") "RTN","SAMIJS1",100,0) s lien=$o(@lroot@("dfn",dfn,"")) "RTN","SAMIJS1",101,0) q lien "RTN","SAMIJS1",102,0) ; "RTN","SAMIJS1",103,0) ; "RTN","SAMIJS1",104,0) ; "RTN","SAMIJS1",105,0) dfn2pien(dfn) ; extrinsic return the patient graph ien of patient dfn "RTN","SAMIJS1",106,0) n proot,pien "RTN","SAMIJS1",107,0) s proot=$$setroot^%wd("vapals-patients") "RTN","SAMIJS1",108,0) s pien=$o(@proot@("dfn",dfn,"")) "RTN","SAMIJS1",109,0) q pien "RTN","SAMIJS1",110,0) ; "RTN","SAMIJS1",111,0) ; "RTN","SAMIJS1",112,0) ; "RTN","SAMIJS1",113,0) getaien(dfn) ; returns the ien for patient dfn in vapals-archive "RTN","SAMIJS1",114,0) ; is laygo "RTN","SAMIJS1",115,0) n aroot s aroot=$$setroot^%wd("vapals-archive") "RTN","SAMIJS1",116,0) n aien "RTN","SAMIJS1",117,0) s aien=$o(@aroot@(" "),-1)+1 "RTN","SAMIJS1",118,0) q aien "RTN","SAMIJS1",119,0) ; "RTN","SAMIJS1",120,0) ; "RTN","SAMIJS1",121,0) ; "RTN","SAMIJS1",122,0) mkarch(dfn) ; create an archive record for patient dfn "RTN","SAMIJS1",123,0) n lroot,proot,aroot "RTN","SAMIJS1",124,0) n lien,pien,aien "RTN","SAMIJS1",125,0) s lroot=$$setroot^%wd("patient-lookup") "RTN","SAMIJS1",126,0) w !,"patient-lookup: ",lroot "RTN","SAMIJS1",127,0) s proot=$$setroot^%wd("vapals-patients") "RTN","SAMIJS1",128,0) w !,"vapals-patients: ",proot "RTN","SAMIJS1",129,0) s aroot=$$setroot^%wd("vapals-archive") "RTN","SAMIJS1",130,0) w !,"vapals-archive: ",aroot "RTN","SAMIJS1",131,0) ; "RTN","SAMIJS1",132,0) s lien=$$dfn2lien(dfn) "RTN","SAMIJS1",133,0) w !,"lien=",lien "RTN","SAMIJS1",134,0) s pien=$$dfn2pien(dfn) "RTN","SAMIJS1",135,0) w !,"pien=",pien "RTN","SAMIJS1",136,0) ; "RTN","SAMIJS1",137,0) i lien="" d q ; "RTN","SAMIJS1",138,0) . w !,"error, lookup ien not found for patient dfn=",dfn "RTN","SAMIJS1",139,0) ; "RTN","SAMIJS1",140,0) s aien=$o(@aroot@("dfn",dfn,"")) "RTN","SAMIJS1",141,0) i aien'="" d ; "RTN","SAMIJS1",142,0) . k @aroot@(aien) "RTN","SAMIJS1",143,0) i aien="" s aien=$$getaien(dfn) "RTN","SAMIJS1",144,0) w !,"aien=",aien "RTN","SAMIJS1",145,0) ; "RTN","SAMIJS1",146,0) m @aroot@(aien,"patient","lookup")=@lroot@(lien) "RTN","SAMIJS1",147,0) s @aroot@("dfn",dfn,aien)="" "RTN","SAMIJS1",148,0) ; "RTN","SAMIJS1",149,0) n sid s sid="" "RTN","SAMIJS1",150,0) d:pien'="" "RTN","SAMIJS1",151,0) . m @aroot@(aien,"patient","demos")=@proot@(pien) "RTN","SAMIJS1",152,0) . s sid=$g(@proot@(pien,"samistudyid")) "RTN","SAMIJS1",153,0) . i sid="" s sid=$g(@proot@(pien,"sisid")) "RTN","SAMIJS1",154,0) . q:sid="" "RTN","SAMIJS1",155,0) . m @aroot@(aien,"patient","graph")=@proot@("graph",sid) "RTN","SAMIJS1",156,0) ; "RTN","SAMIJS1",157,0) q "RTN","SAMIJS1",158,0) ; "RTN","SAMIJS1",159,0) ; "RTN","SAMIJS1",160,0) ; "RTN","SAMIJS1",161,0) outarch(dfn) ; write out an archive record to an external file "RTN","SAMIJS1",162,0) n aroot s aroot=$$setroot^%wd("vapals-archive") "RTN","SAMIJS1",163,0) n aien s aien=$o(@aroot@("dfn",dfn,""),-1) "RTN","SAMIJS1",164,0) q:aien="" "RTN","SAMIJS1",165,0) ; "RTN","SAMIJS1",166,0) n sid s sid=$g(@aroot@(aien,"patient","demos","samistudyid")) "RTN","SAMIJS1",167,0) n tmpout s tmpout=$na(^TMP("VAPALS-ARCH",$J)) "RTN","SAMIJS1",168,0) k @tmpout "RTN","SAMIJS1",169,0) n arec s arec=$na(@aroot@(aien)) "RTN","SAMIJS1",170,0) d encode^%webjson(arec,tmpout) "RTN","SAMIJS1",171,0) ; "RTN","SAMIJS1",172,0) n adir,fname "RTN","SAMIJS1",173,0) s adir="/home/osehra/www/archive" "RTN","SAMIJS1",174,0) s fname="vapals-"_sid_"-"_dfn_"-"_DT_".json" "RTN","SAMIJS1",175,0) i $$GTF^%ZISH($NA(@tmpout@(1)),3,adir,fname) d ; "RTN","SAMIJS1",176,0) . w !,"file "_fname_" written to "_adir "RTN","SAMIJS1",177,0) ; "RTN","SAMIJS1",178,0) q "RTN","SAMIJS1",179,0) ; "RTN","SAMIJS1",180,0) ; "RTN","SAMIJS1",181,0) ; "RTN","SAMIJS1",182,0) DETAIL() ; displays the archive record for a patient "RTN","SAMIJS1",183,0) ; "RTN","SAMIJS1",184,0) n site,dfn,pat "RTN","SAMIJS1",185,0) s site=$$PICSITE^SAMIMOV() "RTN","SAMIJS1",186,0) q:site="^" "RTN","SAMIJS1",187,0) d PICPAT^SAMIMOV(.pat,site) "RTN","SAMIJS1",188,0) w " ",$g(pat("name")) "RTN","SAMIJS1",189,0) s dfn=$g(pat("dfn")) "RTN","SAMIJS1",190,0) w !,"dfn=",dfn "RTN","SAMIJS1",191,0) q:dfn="" "RTN","SAMIJS1",192,0) n aroot ; archive root "RTN","SAMIJS1",193,0) s aroot=$$setroot^%wd("vapals-archive") "RTN","SAMIJS1",194,0) d mkarch(dfn) "RTN","SAMIJS1",195,0) n aien "RTN","SAMIJS1",196,0) s aien=$o(@aroot@("dfn",dfn,"")) "RTN","SAMIJS1",197,0) i aien="" d q ; "RTN","SAMIJS1",198,0) . w !,"patient not found in archive" "RTN","SAMIJS1",199,0) n groot "RTN","SAMIJS1",200,0) s groot=$na(@aroot@(aien)) "RTN","SAMIJS1",201,0) n OUT s OUT=$na(^TMP("SAMIOUT",$J)) "RTN","SAMIJS1",202,0) k @OUT "RTN","SAMIJS1",203,0) D GTREE^SYNVPR(groot,9,,,OUT) "RTN","SAMIJS1",204,0) D BROWSE^DDBR(OUT,"N","Patient") "RTN","SAMIJS1",205,0) k @OUT "RTN","SAMIJS1",206,0) q "RTN","SAMIJS1",207,0) ; "RTN","SAMIJS1",208,0) ; "RTN","SAMIJS1",209,0) ; "RTN","SAMIJS1",210,0) EOR ; end of routine SAMIJS1 "RTN","SAMIJS2") 0^10^B50763648 "RTN","SAMIJS2",1,0) SAMIJS2 ;ven/gpl - json archive import ;2021-07-01t17:08z "RTN","SAMIJS2",2,0) ;;18.0;SAMI;**12**;2020-01;Build 6 "RTN","SAMIJS2",3,0) ;;1.18.0.12-t3+i12 "RTN","SAMIJS2",4,0) ; "RTN","SAMIJS2",5,0) ; Routine SAMIJS2 contains more subroutines for importing VAPALS- "RTN","SAMIJS2",6,0) ; ELCAP JSON archives, which are used for import, export, & migration "RTN","SAMIJS2",7,0) ; of SAMI data. "RTN","SAMIJS2",8,0) ; "RTN","SAMIJS2",9,0) quit ; no entry from top "RTN","SAMIJS2",10,0) ; "RTN","SAMIJS2",11,0) ; "RTN","SAMIJS2",12,0) ; "RTN","SAMIJS2",13,0) ;@section 0 primary development "RTN","SAMIJS2",14,0) ; "RTN","SAMIJS2",15,0) ; "RTN","SAMIJS2",16,0) ; "RTN","SAMIJS2",17,0) ;@routine-credits "RTN","SAMIJS2",18,0) ;@primary-dev George P. Lilly (gpl) "RTN","SAMIJS2",19,0) ; gpl@vistaexpertise.net "RTN","SAMIJS2",20,0) ;@primary-dev-org Vista Expertise Network (ven) "RTN","SAMIJS2",21,0) ; http://vistaexpertise.net "RTN","SAMIJS2",22,0) ;@copyright 2017/2021, gpl, all rights reserved "RTN","SAMIJS2",23,0) ;@license see routine SAMIUL "RTN","SAMIJS2",24,0) ; "RTN","SAMIJS2",25,0) ;@last-updated 2021-07-01t17:08z "RTN","SAMIJS2",26,0) ;@application Screening Applications Management (SAM) "RTN","SAMIJS2",27,0) ;@module Screening Applications Management - IELCAP (SAMI) "RTN","SAMIJS2",28,0) ;@suite-of-files SAMI Forms (311.101-311.199) "RTN","SAMIJS2",29,0) ;@version 1.18.0.12-t3+i12 "RTN","SAMIJS2",30,0) ;@release-date 2020-01 "RTN","SAMIJS2",31,0) ;@patch-list **12** "RTN","SAMIJS2",32,0) ; "RTN","SAMIJS2",33,0) ;@additional-dev Frederick D. S. Marshall (toad) "RTN","SAMIJS2",34,0) ; toad@vistaexpertise.net "RTN","SAMIJS2",35,0) ;@additional-dev Kenneth W. McGlothlen (mcglk) "RTN","SAMIJS2",36,0) ; mcglk@vistaexpertise.net "RTN","SAMIJS2",37,0) ; "RTN","SAMIJS2",38,0) ;@routine-log repo github.com:VA-PALS-ELCAP/SAMI-VAPALS-ELCAP.git "RTN","SAMIJS2",39,0) ; see routine SAMIJS1 for dev log. "RTN","SAMIJS2",40,0) ; "RTN","SAMIJS2",41,0) ;@contents "RTN","SAMIJS2",42,0) ; FILE load files from file system "RTN","SAMIJS2",43,0) ; wsPostSAMI accept incoming SAMI record in VAPALS "RTN","SAMIJS2",44,0) ; $$loaded is filename already loaded? "RTN","SAMIJS2",45,0) ; "RTN","SAMIJS2",46,0) ; "RTN","SAMIJS2",47,0) ; "RTN","SAMIJS2",48,0) ;@section 1 subroutines "RTN","SAMIJS2",49,0) ; "RTN","SAMIJS2",50,0) ; "RTN","SAMIJS2",51,0) ; "RTN","SAMIJS2",52,0) FILE(directory) ; [Public] Load files from the file system; OPT: SAMI LOAD FILES "RTN","SAMIJS2",53,0) ; "RTN","SAMIJS2",54,0) if '$data(directory) do "RTN","SAMIJS2",55,0) . N DIR,X,Y,DA,DIRUT,DTOUT,DUOUT,DIROUT "RTN","SAMIJS2",56,0) . S DIR(0)="F^0:1024" "RTN","SAMIJS2",57,0) . S DIR("A")="Enter directory from which to load Patients" "RTN","SAMIJS2",58,0) . D ^DIR "RTN","SAMIJS2",59,0) . W ! "RTN","SAMIJS2",60,0) . if '$data(DIRUT) set directory=Y "RTN","SAMIJS2",61,0) quit:'$data(directory) "RTN","SAMIJS2",62,0) ; "RTN","SAMIJS2",63,0) ; Load files from directory "RTN","SAMIJS2",64,0) new samifiles "RTN","SAMIJS2",65,0) new samimask set samimask("*.json")="" "RTN","SAMIJS2",66,0) new % set %=$$LIST^%ZISH(directory,$na(samimask),$na(samifiles)) "RTN","SAMIJS2",67,0) if '% write "Failed to read any files. Check directory.",! quit "RTN","SAMIJS2",68,0) ; "RTN","SAMIJS2",69,0) new file set file="" "RTN","SAMIJS2",70,0) for set file=$order(samifiles(file)) q:file="" do "RTN","SAMIJS2",71,0) . if file["Information" quit ; We don't process information files yet... "RTN","SAMIJS2",72,0) . ; "RTN","SAMIJS2",73,0) . write "Loading ",file,"...",! "RTN","SAMIJS2",74,0) . if $$loaded(file) d q ; "RTN","SAMIJS2",75,0) .. w "already loaded, skipping "_file,! "RTN","SAMIJS2",76,0) . ; "RTN","SAMIJS2",77,0) . kill ^TMP("SAMIFILE",$J) "RTN","SAMIJS2",78,0) . new % set %=$$FTG^%ZISH(directory,file,$name(^TMP("SAMIFILE",$J,1)),3) "RTN","SAMIJS2",79,0) . i '% write "Failed to read the file. Please debug me.",! quit "RTN","SAMIJS2",80,0) . ; "RTN","SAMIJS2",81,0) . ; Normalize overflow nodes (and hope for the best that we don't go over 32k) "RTN","SAMIJS2",82,0) . new i,j set (i,j)="" "RTN","SAMIJS2",83,0) . for set i=$order(^TMP("SAMIFILE",$J,i)) quit:'i for set j=$order(^TMP("SAMIFILE",$J,i,"OVF",j)) quit:'j do "RTN","SAMIJS2",84,0) .. set ^TMP("SAMIFILE",$J,i)=^TMP("SAMIFILE",$J,i)_^TMP("SAMIFILE",$J,i,"OVF",j) ; ** NOT TESTED ** "RTN","SAMIJS2",85,0) . ; "RTN","SAMIJS2",86,0) . ; Now load the file into Vapals "RTN","SAMIJS2",87,0) . write "Ingesting ",file,"...",! "RTN","SAMIJS2",88,0) . ; "RTN","SAMIJS2",89,0) . do "RTN","SAMIJS2",90,0) .. new samifiles,file,directory "RTN","SAMIJS2",91,0) .. do KILL^XUSCLEAN ; VistA leaks like hell "RTN","SAMIJS2",92,0) . ; "RTN","SAMIJS2",93,0) . new root set root=$$setroot^%wd("vapals-intake") "RTN","SAMIJS2",94,0) . new ien set ien=$order(@root@(" "),-1)+1 "RTN","SAMIJS2",95,0) . new gr set gr=$name(@root@(ien,"json")) "RTN","SAMIJS2",96,0) . do decode^%webjson($na(^TMP("SAMIFILE",$J)),gr) "RTN","SAMIJS2",97,0) . set @root@("file",file,ien)="" "RTN","SAMIJS2",98,0) . new args,samijsonreturn "RTN","SAMIJS2",99,0) . new % set %=$$wsPostSAMI(.args,,.samijsonreturn,ien) ; ignore % which always comes out at 1 "RTN","SAMIJS2",100,0) . ; "RTN","SAMIJS2",101,0) . ; Get the status back from JSON "RTN","SAMIJS2",102,0) . new samireturn,samijsonerror "RTN","SAMIJS2",103,0) . do decode^%webjson($na(samijsonreturn),$na(samireturn),$na(samijsonerror)) "RTN","SAMIJS2",104,0) . if $data(samijsonerror) write "There is an error decoding the return. Debug me." quit "RTN","SAMIJS2",105,0) . ; "RTN","SAMIJS2",106,0) . q:'$d(samireturn) "RTN","SAMIJS2",107,0) . if $get(samireturn("loadMessage"))["Duplicate" write "Patient Already Loaded",! quit "RTN","SAMIJS2",108,0) . n errmsg s errmsg=$get(samireturn("loadMessage")) "RTN","SAMIJS2",109,0) . if errmsg["Error" d q ; "RTN","SAMIJS2",110,0) . . write errmsg,! "RTN","SAMIJS2",111,0) . write " ",errmsg,! "RTN","SAMIJS2",112,0) . ; "RTN","SAMIJS2",113,0) . write " Loaded with following data: ",! "RTN","SAMIJS2",114,0) . write "DFN: ",$g(samireturn("dfn")),?15,"STUDYID: ",$g(samireturn("sid")),?25," LIEN: ",$g(samireturn("ien")),?50,"Name: ",$g(samireturn("name")),! "RTN","SAMIJS2",115,0) . write "--------------------------------------------------------------------------",! "RTN","SAMIJS2",116,0) . ;b "RTN","SAMIJS2",117,0) q "RTN","SAMIJS2",118,0) ; "RTN","SAMIJS2",119,0) ; "RTN","SAMIJS2",120,0) ; "RTN","SAMIJS2",121,0) wsPostSAMI(args,body,return,ien) ; accept incoming SAMI record in VAPALS "RTN","SAMIJS2",122,0) ; "RTN","SAMIJS2",123,0) n rtn "RTN","SAMIJS2",124,0) n lroot,proot,iroot "RTN","SAMIJS2",125,0) s iroot=$$setroot^%wd("vapals-intake") "RTN","SAMIJS2",126,0) s proot=$$setroot^%wd("vapals-patients") "RTN","SAMIJS2",127,0) s lroot=$$setroot^%wd("patient-lookup") "RTN","SAMIJS2",128,0) n lien,pien,grloaded,dfn,sid "RTN","SAMIJS2",129,0) s (lien,pien,grloaded)=0 "RTN","SAMIJS2",130,0) i '$d(@iroot@(ien,"json","patient","lookup")) d q ; "RTN","SAMIJS2",131,0) . s rtn("loadMessage")="Error, patient lookup missing" "RTN","SAMIJS2",132,0) . d encode^%webjson("rtn","return","zerr") "RTN","SAMIJS2",133,0) ; so, what is the dfn.. it is the number for this patient on this system "RTN","SAMIJS2",134,0) ;s dfn=$g(@iroot@(ien,"json","patient","lookup","dfn")) "RTN","SAMIJS2",135,0) ;i dfn="" d q ; "RTN","SAMIJS2",136,0) ;. s rtn("loadMessage")="Error, dfn missing" "RTN","SAMIJS2",137,0) ;. d encode^%webjson("rtn","return","zerr") "RTN","SAMIJS2",138,0) ;n newdfn s newdfn=0 "RTN","SAMIJS2",139,0) ;i $d(@lroot@("dfn",dfn)) d ; oops need a new dfn for this system "RTN","SAMIJS2",140,0) ;. s dfn=$o(@lroot@("dfn"," "),-1)+1 "RTN","SAMIJS2",141,0) ;. s newdfn=1 ; remember to propogate the new dfn "RTN","SAMIJS2",142,0) s dfn=$o(@lroot@("dfn"," "),-1)+1 "RTN","SAMIJS2",143,0) i $o(@proot@("dfn"," "),-1)+1>dfn s dfn=$o(@proot@("dfn"," "),-1)+1 "RTN","SAMIJS2",144,0) s rtn("dfn")=dfn "RTN","SAMIJS2",145,0) i '$d(@lroot@(dfn)) s lien=dfn "RTN","SAMIJS2",146,0) e s lien=$o(@lroot@(" "),-1)+1 "RTN","SAMIJS2",147,0) s rtn("ien")=lien "RTN","SAMIJS2",148,0) ;i newdfn=1 s @lroot@(lien,"dfn")=dfn "RTN","SAMIJS2",149,0) n name s name=$g(@iroot@(ien,"json","patient","lookup","saminame")) "RTN","SAMIJS2",150,0) i name="" d q ; "RTN","SAMIJS2",151,0) . s rtn("loadMessage")="Error, name missing" "RTN","SAMIJS2",152,0) . d encode^%webjson("rtn","return","zerr") "RTN","SAMIJS2",153,0) s rtn("name")=name "RTN","SAMIJS2",154,0) m @lroot@(lien)=@iroot@(ien,"json","patient","lookup") "RTN","SAMIJS2",155,0) s @lroot@(lien,"dfn")=dfn "RTN","SAMIJS2",156,0) d INDXPTLK^SAMIHOM4(lien) "RTN","SAMIJS2",157,0) ; "RTN","SAMIJS2",158,0) ; detect if enrolled "RTN","SAMIJS2",159,0) ; "RTN","SAMIJS2",160,0) i '$d(@iroot@(ien,"json","patient","demos")) d q ; "RTN","SAMIJS2",161,0) . s rtn("loadMessage")="Load sucessful, not enrolled" "RTN","SAMIJS2",162,0) . d encode^%webjson("rtn","return","zerr") "RTN","SAMIJS2",163,0) ; "RTN","SAMIJS2",164,0) ; determine pien in vapals-patients "RTN","SAMIJS2",165,0) ; "RTN","SAMIJS2",166,0) ;i '$d(@proot@(dfn)) s pien=dfn "RTN","SAMIJS2",167,0) ;e s pien=$$NEXTNUM^SAMIHOM3() "RTN","SAMIJS2",168,0) s pien=$$NEXTNUM^SAMIHOM3() "RTN","SAMIJS2",169,0) m @proot@(pien)=@iroot@(ien,"json","patient","demos") "RTN","SAMIJS2",170,0) s @proot@("dfn",dfn,pien)="" "RTN","SAMIJS2",171,0) ;i newdfn s @proot@(pien,"dfn")=dfn "RTN","SAMIJS2",172,0) s @proot@(pien,"dfn")=dfn "RTN","SAMIJS2",173,0) ; "RTN","SAMIJS2",174,0) ; determine studyid (sid) "RTN","SAMIJS2",175,0) ; "RTN","SAMIJS2",176,0) n sid s sid=$g(@proot@(pien,"samistudyid")) "RTN","SAMIJS2",177,0) i sid="" d q ; "RTN","SAMIJS2",178,0) . s rtn("loadMessage")="Error, studyid missing" "RTN","SAMIJS2",179,0) . d encode^%webjson("rtn","return","zerr") "RTN","SAMIJS2",180,0) i $d(@proot@("sid",sid)) d q ; opps we need a new sid for this system "RTN","SAMIJS2",181,0) . s rtn("loadMessage")="Error, studyid is not unique" "RTN","SAMIJS2",182,0) . d encode^%webjson("rtn","return","zerr") "RTN","SAMIJS2",183,0) s rtn("sid")=sid "RTN","SAMIJS2",184,0) s @proot@("sid",sid,pien)="" "RTN","SAMIJS2",185,0) ; "RTN","SAMIJS2",186,0) ; merge in all the forms "RTN","SAMIJS2",187,0) ; "RTN","SAMIJS2",188,0) m @proot@("graph",sid)=@iroot@(ien,"json","patient","graph") "RTN","SAMIJS2",189,0) ; "RTN","SAMIJS2",190,0) ; encode the successful return "RTN","SAMIJS2",191,0) ; "RTN","SAMIJS2",192,0) s rtn("loadMessage")="Load successful, enrolled" "RTN","SAMIJS2",193,0) d encode^%webjson("rtn","return","zerr") "RTN","SAMIJS2",194,0) q "RTN","SAMIJS2",195,0) ; "RTN","SAMIJS2",196,0) ; "RTN","SAMIJS2",197,0) ; "RTN","SAMIJS2",198,0) loaded(filenm,graph) ;extrinsic returns 1 if the filename is already loaded "RTN","SAMIJS2",199,0) ; in the graph default for graph is vapals-intake "RTN","SAMIJS2",200,0) if $g(graph)="" s graph="vapals-intake" "RTN","SAMIJS2",201,0) n tmproot s tmproot=$$setroot^%wd(graph) "RTN","SAMIJS2",202,0) i $d(@tmproot@("file",filenm)) q 1 "RTN","SAMIJS2",203,0) q 0 "RTN","SAMIJS2",204,0) ; "RTN","SAMIJS2",205,0) ; "RTN","SAMIJS2",206,0) ; "RTN","SAMIJS2",207,0) EOR ; end of routine SAMIJS2 "RTN","SAMINOT1") 0^11^B476873160 "RTN","SAMINOT1",1,0) SAMINOT1 ;ven/gpl - text notes ;2021-07-01t17:21z "RTN","SAMINOT1",2,0) ;;18.0;SAMI;**2,6,8,10,11,12**;2020-01;Build 6 "RTN","SAMINOT1",3,0) ;;1.18.0.12-t3+i12 "RTN","SAMINOT1",4,0) ; "RTN","SAMINOT1",5,0) ; SAMINOT1 contains a web service & associated subroutines to produce "RTN","SAMINOT1",6,0) ; VAPALS-ELCAP text notes. "RTN","SAMINOT1",7,0) ; "RTN","SAMINOT1",8,0) quit ; no entry from top "RTN","SAMINOT1",9,0) ; "RTN","SAMINOT1",10,0) ; "RTN","SAMINOT1",11,0) ; "RTN","SAMINOT1",12,0) ;@section 0 primary development "RTN","SAMINOT1",13,0) ; "RTN","SAMINOT1",14,0) ; "RTN","SAMINOT1",15,0) ; "RTN","SAMINOT1",16,0) ;@routine-credits "RTN","SAMINOT1",17,0) ;@primary-dev George P. Lilly (gpl) "RTN","SAMINOT1",18,0) ; gpl@vistaexpertise.net "RTN","SAMINOT1",19,0) ;@primary-dev-org Vista Expertise Network (ven) "RTN","SAMINOT1",20,0) ; http://vistaexpertise.net "RTN","SAMINOT1",21,0) ;@copyright 2017/2021, gpl, all rights reserved "RTN","SAMINOT1",22,0) ;@license see routine SAMIUL "RTN","SAMINOT1",23,0) ; "RTN","SAMINOT1",24,0) ;@last-updated 2021-07-01t17:21z "RTN","SAMINOT1",25,0) ;@application Screening Applications Management (SAM) "RTN","SAMINOT1",26,0) ;@module Screening Applications Management - IELCAP (SAMI) "RTN","SAMINOT1",27,0) ;@suite-of-files SAMI Forms (311.101-311.199) "RTN","SAMINOT1",28,0) ;@version 1.18.0.12-t3+i12 "RTN","SAMINOT1",29,0) ;@release-date 2020-01 "RTN","SAMINOT1",30,0) ;@patch-list **2,6,8,10,11,12** "RTN","SAMINOT1",31,0) ; "RTN","SAMINOT1",32,0) ;@additional-dev Frederick D. S. Marshall (toad) "RTN","SAMINOT1",33,0) ; toad@vistaexpertise.net "RTN","SAMINOT1",34,0) ;@additional-dev Larry G. Carlson (lgc) "RTN","SAMINOT1",35,0) ; larry.g.carlson@gmail.com "RTN","SAMINOT1",36,0) ;@additional-dev Linda M. R. Yaw (lmry) "RTN","SAMINOT1",37,0) ; linda.yaw@vistaexpertise.net "RTN","SAMINOT1",38,0) ;@additional-dev Alexis R. Carlson (arc) "RTN","SAMINOT1",39,0) ; whatisthehumanspirit@gmail.com "RTN","SAMINOT1",40,0) ;@additional-dev Domenic DiNatale (dom) "RTN","SAMINOT1",41,0) ; domenic.dinatale@paraxialtech.com "RTN","SAMINOT1",42,0) ; "RTN","SAMINOT1",43,0) ;@module-credits "RTN","SAMINOT1",44,0) ;@project VA Partnership to Increase Access to Lung Screening "RTN","SAMINOT1",45,0) ; (VA-PALS) "RTN","SAMINOT1",46,0) ; http://va-pals.org/ "RTN","SAMINOT1",47,0) ;@funding 2017/2021, Bristol-Myers Squibb Foundation (bmsf) "RTN","SAMINOT1",48,0) ; https://www.bms.com/about-us/responsibility/bristol-myers-squibb-foundation.html "RTN","SAMINOT1",49,0) ;@partner-org Veterans Affairs Office of Rural health "RTN","SAMINOT1",50,0) ; https://www.ruralhealth.va.gov/ "RTN","SAMINOT1",51,0) ;@partner-org International Early Lung Cancer Action Program (I-ELCAP) "RTN","SAMINOT1",52,0) ; http://ielcap.com/ "RTN","SAMINOT1",53,0) ;@partner-org Paraxial Technologies (par) "RTN","SAMINOT1",54,0) ; http://paraxialtech.com/ "RTN","SAMINOT1",55,0) ;@partner-org Open Source Electronic Health Record Alliance (OSEHRA) "RTN","SAMINOT1",56,0) ; https://www.osehra.org/groups/va-pals-open-source-project-group "RTN","SAMINOT1",57,0) ; "RTN","SAMINOT1",58,0) ;@module-log repo github.com:VA-PALS-ELCAP/SAMI-VAPALS-ELCAP.git "RTN","SAMINOT1",59,0) ; see routine SAMINUL "RTN","SAMINOT1",60,0) ; "RTN","SAMINOT1",61,0) ;@contents "RTN","SAMINOT1",62,0) ; $$EXISTCE does chart eligibility note exist? "RTN","SAMINOT1",63,0) ; $$EXISTPRE does pre-enrollment note exist? "RTN","SAMINOT1",64,0) ; $$EXISTINT does intake note exist? "RTN","SAMINOT1",65,0) ; WSNOTE web service: text note "RTN","SAMINOT1",66,0) ; NOTE create note "RTN","SAMINOT1",67,0) ; $$HASINNT is intake note present? "RTN","SAMINOT1",68,0) ; MKEL make eligibility note "RTN","SAMINOT1",69,0) ; MKPRE make pre-enrollment note "RTN","SAMINOT1",70,0) ; MKIN make intake note "RTN","SAMINOT1",71,0) ; $$MKNT make note "RTN","SAMINOT1",72,0) ; $$MKNTLOC location for note "RTN","SAMINOT1",73,0) ; $$NTDTTM date & time in note format "RTN","SAMINOT1",74,0) ; $$NTLOCN location of nth note "RTN","SAMINOT1",75,0) ; $$NTLAST location of latest note "RTN","SAMINOT1",76,0) ; $$NTIEN latest note for this form "RTN","SAMINOT1",77,0) ; $$NTLIST note list "RTN","SAMINOT1",78,0) ; TLST ??? "RTN","SAMINOT1",79,0) ; ELNOTE eligibility note text "RTN","SAMINOT1",80,0) ; PRENOTE pre-enrollment note "RTN","SAMINOT1",81,0) ; SUBRSLT translation of discussion result "RTN","SAMINOT1",82,0) ; INNOTE intake note "RTN","SAMINOT1",83,0) ; SDM add shared decision making text to array "RTN","SAMINOT1",84,0) ; GLOUT glob out, 1st wrap ln, then put in dest "RTN","SAMINOT1",85,0) ; OUT ??? "RTN","SAMINOT1",86,0) ; $$XVAL patient value for variable "RTN","SAMINOT1",87,0) ; "RTN","SAMINOT1",88,0) ; "RTN","SAMINOT1",89,0) ; "RTN","SAMINOT1",90,0) ;@section 1 wsi WSNOTE^SAMINOT1 & related subroutines "RTN","SAMINOT1",91,0) ; "RTN","SAMINOT1",92,0) ; "RTN","SAMINOT1",93,0) ; "RTN","SAMINOT1",94,0) EXISTCE(SID,FORM) ; extrinsic returns "true" or "false" "RTN","SAMINOT1",95,0) ; "RTN","SAMINOT1",96,0) ; if a Chart Eligibility Note exists "RTN","SAMINOT1",97,0) ; "RTN","SAMINOT1",98,0) n root s root=$$setroot^%wd("vapals-patients") "RTN","SAMINOT1",99,0) n gvals s gvals=$na(@root@("graph",SID,FORM)) "RTN","SAMINOT1",100,0) ;i $g(@root@("graph",SID,FORM,"sicechrt"))="y" q "true" "RTN","SAMINOT1",101,0) i $g(@gvals@("chart-eligibility-complete"))="true" q "true" "RTN","SAMINOT1",102,0) ; "RTN","SAMINOT1",103,0) quit "false" ; end of $$EXISTCE "RTN","SAMINOT1",104,0) ; "RTN","SAMINOT1",105,0) ; "RTN","SAMINOT1",106,0) ; "RTN","SAMINOT1",107,0) EXISTPRE(SID,FORM) ; extrinsic returns "true" or "false" "RTN","SAMINOT1",108,0) ; "RTN","SAMINOT1",109,0) ; if a Pre-enrollment Note exists "RTN","SAMINOT1",110,0) ; "RTN","SAMINOT1",111,0) n root s root=$$setroot^%wd("vapals-patients") "RTN","SAMINOT1",112,0) n gvals s gvals=$na(@root@("graph",SID,FORM)) "RTN","SAMINOT1",113,0) ;i $g(@root@("graph",SID,FORM,"sipedisc"))="y" q "true" "RTN","SAMINOT1",114,0) ;i $g(@gvals@("pre-note-complete"))="true" i $g(@gvals@("siperslt"))="y" q "true" "RTN","SAMINOT1",115,0) i $g(@gvals@("pre-note-complete"))="true" q "true" "RTN","SAMINOT1",116,0) ; "RTN","SAMINOT1",117,0) quit "false" ; end of $$EXISTPRE "RTN","SAMINOT1",118,0) ; "RTN","SAMINOT1",119,0) ; "RTN","SAMINOT1",120,0) ; "RTN","SAMINOT1",121,0) EXISTINT(SID,FORM) ; extrinsic returns "true" or "false" "RTN","SAMINOT1",122,0) ; "RTN","SAMINOT1",123,0) ; if an Intake Note exists "RTN","SAMINOT1",124,0) ; "RTN","SAMINOT1",125,0) n root s root=$$setroot^%wd("vapals-patients") "RTN","SAMINOT1",126,0) i $g(@root@("graph",SID,FORM,"sistatus"))="y" q "true" "RTN","SAMINOT1",127,0) ; "RTN","SAMINOT1",128,0) quit "false" ; end of $$EXISTINT "RTN","SAMINOT1",129,0) ; "RTN","SAMINOT1",130,0) ; "RTN","SAMINOT1",131,0) ; "RTN","SAMINOT1",132,0) WSNOTE(return,filter) ; web service which returns a text note "RTN","SAMINOT1",133,0) ; "RTN","SAMINOT1",134,0) n debug s debug=0 "RTN","SAMINOT1",135,0) i $g(filter("debug"))=1 s debug=1 "RTN","SAMINOT1",136,0) ; "RTN","SAMINOT1",137,0) k return "RTN","SAMINOT1",138,0) s HTTPRSP("mime")="text/html" "RTN","SAMINOT1",139,0) ; "RTN","SAMINOT1",140,0) n si "RTN","SAMINOT1",141,0) s si=$g(filter("studyid")) "RTN","SAMINOT1",142,0) i si="" d ; "RTN","SAMINOT1",143,0) . s si="XXX00333" "RTN","SAMINOT1",144,0) q:si="" "RTN","SAMINOT1",145,0) ; "RTN","SAMINOT1",146,0) n samikey "RTN","SAMINOT1",147,0) s samikey=$g(filter("form")) "RTN","SAMINOT1",148,0) n root s root=$$setroot^%wd("vapals-patients") "RTN","SAMINOT1",149,0) i samikey="" d ; "RTN","SAMINOT1",150,0) . s samikey=$o(@root@("graph",si,"siform")) "RTN","SAMINOT1",151,0) . ;w !,samikey "RTN","SAMINOT1",152,0) . ;b "RTN","SAMINOT1",153,0) ; "RTN","SAMINOT1",154,0) n vals "RTN","SAMINOT1",155,0) m vals=@root@("graph",si,samikey) "RTN","SAMINOT1",156,0) ; "RTN","SAMINOT1",157,0) n note,nien,ntype "RTN","SAMINOT1",158,0) s ntype="" "RTN","SAMINOT1",159,0) s note="" "RTN","SAMINOT1",160,0) s nien=$g(filter("nien")) "RTN","SAMINOT1",161,0) i nien="" d "RTN","SAMINOT1",162,0) . s:$g(vals("samistatus"))="complete" ntype="intake" "RTN","SAMINOT1",163,0) . s:$g(vals("samistatus"))="chart-eligibility" ntype="eligibility" "RTN","SAMINOT1",164,0) . s:$g(vals("samistatus"))="pre-enrollment-discussion" ntype="pre-note" "RTN","SAMINOT1",165,0) . q:ntype="" "RTN","SAMINOT1",166,0) . ;d nien=$$NTTYPE add code to pull the latest note by type "RTN","SAMINOT1",167,0) q:nien="" "RTN","SAMINOT1",168,0) n notebase "RTN","SAMINOT1",169,0) s notebase=$$NTLOCN(si,samikey,nien) ; global location for the note "RTN","SAMINOT1",170,0) s note=$na(@notebase@("text")) "RTN","SAMINOT1",171,0) i '$d(@note) q "RTN","SAMINOT1",172,0) ; "RTN","SAMINOT1",173,0) new temp,tout "RTN","SAMINOT1",174,0) do GETTMPL^SAMICASE("temp","vapals:note") "RTN","SAMINOT1",175,0) quit:'$data(temp) "RTN","SAMINOT1",176,0) ; "RTN","SAMINOT1",177,0) n cnt s cnt=0 "RTN","SAMINOT1",178,0) n zi s zi="" "RTN","SAMINOT1",179,0) ; "RTN","SAMINOT1",180,0) f s zi=$o(temp(zi)) q:zi="" d ; "RTN","SAMINOT1",181,0) . ; "RTN","SAMINOT1",182,0) . n line s line=temp(zi) "RTN","SAMINOT1",183,0) . D LOAD^SAMIFORM(.line,samikey,si,.filter,.vals) "RTN","SAMINOT1",184,0) . s temp(zi)=line "RTN","SAMINOT1",185,0) . ; "RTN","SAMINOT1",186,0) . s cnt=cnt+1 "RTN","SAMINOT1",187,0) . s tout(cnt)=temp(zi) "RTN","SAMINOT1",188,0) . ; "RTN","SAMINOT1",189,0) . i temp(zi)["report-text" d ; "RTN","SAMINOT1",190,0) . . i temp(zi)["#" q ; "RTN","SAMINOT1",191,0) . . n zj s zj="" "RTN","SAMINOT1",192,0) . . f s zj=$o(@note@(zj)) q:zj="" d ; "RTN","SAMINOT1",193,0) . . . s cnt=cnt+1 "RTN","SAMINOT1",194,0) . . . ;s tout(cnt)=@note@(zj)_"<br>" "RTN","SAMINOT1",195,0) . . . s tout(cnt)=@note@(zj)_$char(13,10) "RTN","SAMINOT1",196,0) m return=tout "RTN","SAMINOT1",197,0) ; "RTN","SAMINOT1",198,0) quit ; end of WSNOTE "RTN","SAMINOT1",199,0) ; "RTN","SAMINOT1",200,0) ; "RTN","SAMINOT1",201,0) ; "RTN","SAMINOT1",202,0) NOTE(filter) ; extrnisic which creates a note "RTN","SAMINOT1",203,0) ; "RTN","SAMINOT1",204,0) ; returns 1 if successful, 0 if not "RTN","SAMINOT1",205,0) ; "RTN","SAMINOT1",206,0) ; set up patient values "RTN","SAMINOT1",207,0) ; "RTN","SAMINOT1",208,0) n vals "RTN","SAMINOT1",209,0) ; "RTN","SAMINOT1",210,0) n si "RTN","SAMINOT1",211,0) s si=$g(filter("studyid")) "RTN","SAMINOT1",212,0) i si="" d ; "RTN","SAMINOT1",213,0) . s si="XXX00333" "RTN","SAMINOT1",214,0) q:si="" "RTN","SAMINOT1",215,0) ; "RTN","SAMINOT1",216,0) n samikey "RTN","SAMINOT1",217,0) s samikey=$g(filter("form")) "RTN","SAMINOT1",218,0) n root s root=$$setroot^%wd("vapals-patients") "RTN","SAMINOT1",219,0) i samikey="" d ; "RTN","SAMINOT1",220,0) . s samikey=$o(@root@("graph",si,"siform")) "RTN","SAMINOT1",221,0) . ;w !,samikey "RTN","SAMINOT1",222,0) . ;b "RTN","SAMINOT1",223,0) ; "RTN","SAMINOT1",224,0) s vals=$na(@root@("graph",si,samikey)) "RTN","SAMINOT1",225,0) ; "RTN","SAMINOT1",226,0) i '$d(@vals) d q 0 ; "RTN","SAMINOT1",227,0) . ;w !,"error, patient values not found" "RTN","SAMINOT1",228,0) ;zwr @vals@(*) "RTN","SAMINOT1",229,0) ; "RTN","SAMINOT1",230,0) k ^SAMIUL("NOTE") "RTN","SAMINOT1",231,0) m ^SAMIUL("NOTE","vals")=@vals "RTN","SAMINOT1",232,0) m ^SAMIUL("NOTE","filter")=filter "RTN","SAMINOT1",233,0) ; "RTN","SAMINOT1",234,0) n didnote s didnote=0 "RTN","SAMINOT1",235,0) ; "RTN","SAMINOT1",236,0) i $g(@vals@("samistatus"))="chart-eligibility" d ; "RTN","SAMINOT1",237,0) . q:$g(@vals@("chart-eligibility-complete"))="true" "RTN","SAMINOT1",238,0) . d MKEL(si,samikey,vals,.filter) ; "RTN","SAMINOT1",239,0) . s didnote=1 "RTN","SAMINOT1",240,0) ; "RTN","SAMINOT1",241,0) i $g(@vals@("samistatus"))="pre-enrollment-discussion" d ; "RTN","SAMINOT1",242,0) . q:$g(@vals@("pre-note-complete"))="true" "RTN","SAMINOT1",243,0) . d MKPRE(si,samikey,vals,.filter) ; "RTN","SAMINOT1",244,0) . s didnote=1 "RTN","SAMINOT1",245,0) ; "RTN","SAMINOT1",246,0) i $g(@vals@("samistatus"))="complete" d ; "RTN","SAMINOT1",247,0) . q:$$HASINNT(vals) "RTN","SAMINOT1",248,0) . d MKIN(si,samikey,vals,.filter) ; "RTN","SAMINOT1",249,0) . s didnote=1 "RTN","SAMINOT1",250,0) ; "RTN","SAMINOT1",251,0) n nien s nien=0 "RTN","SAMINOT1",252,0) i didnote=1 s nien=$$NTIEN(si,samikey) "RTN","SAMINOT1",253,0) ; "RTN","SAMINOT1",254,0) quit nien ; end of $$NOTE "RTN","SAMINOT1",255,0) ; "RTN","SAMINOT1",256,0) ; "RTN","SAMINOT1",257,0) ; "RTN","SAMINOT1",258,0) HASINNT(vals) ; extrinsic returns 1 if intake note is present "RTN","SAMINOT1",259,0) ; "RTN","SAMINOT1",260,0) ; else returns 0 "RTN","SAMINOT1",261,0) ; "RTN","SAMINOT1",262,0) n zzi,zzrtn s (zzi,zzrtn)=0 "RTN","SAMINOT1",263,0) q:'$d(@vals) "RTN","SAMINOT1",264,0) f s zzi=$o(@vals@("notes",zzi)) q:+zzi=0 d ; "RTN","SAMINOT1",265,0) . i $g(@vals@("notes",zzi,"name"))["Intake" s zzrtn=1 "RTN","SAMINOT1",266,0) ; "RTN","SAMINOT1",267,0) quit zzrtn ; end of $$HASINNT "RTN","SAMINOT1",268,0) ; "RTN","SAMINOT1",269,0) ; "RTN","SAMINOT1",270,0) ; "RTN","SAMINOT1",271,0) MKEL(sid,form,vals,filter) ; "RTN","SAMINOT1",272,0) ; "RTN","SAMINOT1",273,0) n cnt s cnt=0 "RTN","SAMINOT1",274,0) ;n dest s dest=$na(@vals@("eligibility-note")) "RTN","SAMINOT1",275,0) n dest s dest=$$MKNT(vals,"Eligibility Note","eligibility",.filter) "RTN","SAMINOT1",276,0) k @dest "RTN","SAMINOT1",277,0) d OUT("Lung Screening Program Chart Eligibility Note") "RTN","SAMINOT1",278,0) d OUT("") "RTN","SAMINOT1",279,0) d ELNOTE(vals,dest,cnt) "RTN","SAMINOT1",280,0) ; "RTN","SAMINOT1",281,0) quit ; end of MKEL "RTN","SAMINOT1",282,0) ; "RTN","SAMINOT1",283,0) ; "RTN","SAMINOT1",284,0) ; "RTN","SAMINOT1",285,0) MKPRE(sid,form,vals,filter) ; "RTN","SAMINOT1",286,0) ; "RTN","SAMINOT1",287,0) n cnt s cnt=0 "RTN","SAMINOT1",288,0) ;n dest s dest=$na(@vals@("pre-note")) "RTN","SAMINOT1",289,0) n dest s dest=$$MKNT(vals,"Pre-enrollment Discussion Note","prenote",.filter) "RTN","SAMINOT1",290,0) k @dest "RTN","SAMINOT1",291,0) i $g(@vals@("chart-eligibility-complete"))'="true" d ; "RTN","SAMINOT1",292,0) . d OUT("Lung Screening Program Chart Eligibility and Pre-enrollment Discussion Note") "RTN","SAMINOT1",293,0) . d OUT("") "RTN","SAMINOT1",294,0) . d ELNOTE(vals,dest,cnt) "RTN","SAMINOT1",295,0) i $g(@vals@("chart-eligibility-complete"))="true" d ; "RTN","SAMINOT1",296,0) . d OUT("Lung Screening Program Pre-enrollment Discussion Note") "RTN","SAMINOT1",297,0) . d OUT("") "RTN","SAMINOT1",298,0) d PRENOTE(vals,dest,cnt) "RTN","SAMINOT1",299,0) ; "RTN","SAMINOT1",300,0) quit ; end of MKPRE "RTN","SAMINOT1",301,0) ; "RTN","SAMINOT1",302,0) ; "RTN","SAMINOT1",303,0) ; "RTN","SAMINOT1",304,0) MKIN(sid,form,vals,filter) ; "RTN","SAMINOT1",305,0) ; "RTN","SAMINOT1",306,0) n cnt s cnt=0 "RTN","SAMINOT1",307,0) ;n dest s dest=$na(@vals@("intake-note")) "RTN","SAMINOT1",308,0) n dest s dest=$$MKNT(vals,"Intake Note","intake",.filter) "RTN","SAMINOT1",309,0) k @dest "RTN","SAMINOT1",310,0) d OUT("Lung Screening Program Intake Note") "RTN","SAMINOT1",311,0) d OUT("") "RTN","SAMINOT1",312,0) i $g(@vals@("chart-eligibility-complete"))'="true" d ; "RTN","SAMINOT1",313,0) . d ELNOTE(vals,dest,cnt) "RTN","SAMINOT1",314,0) i $g(@vals@("pre-note-complete"))'="true" d ; "RTN","SAMINOT1",315,0) . d PRENOTE(vals,dest,cnt) "RTN","SAMINOT1",316,0) d INNOTE(vals,dest,cnt) "RTN","SAMINOT1",317,0) ; "RTN","SAMINOT1",318,0) quit ; end of MKIN "RTN","SAMINOT1",319,0) ; "RTN","SAMINOT1",320,0) ; "RTN","SAMINOT1",321,0) ; "RTN","SAMINOT1",322,0) MKNT(vals,title,ntype,filter) ; extrinsic makes a note date=now returns "RTN","SAMINOT1",323,0) ; "RTN","SAMINOT1",324,0) ; global addr. filter must be passed by reference "RTN","SAMINOT1",325,0) ; "RTN","SAMINOT1",326,0) n ntdt s ntdt=$$NTDTTM($$NOW^XLFDT) "RTN","SAMINOT1",327,0) n ntptr "RTN","SAMINOT1",328,0) s ntptr=$$MKNTLOC(vals,title,ntdt,$g(ntype),.filter) "RTN","SAMINOT1",329,0) ; "RTN","SAMINOT1",330,0) quit ntptr ; end of $$MKNT "RTN","SAMINOT1",331,0) ; "RTN","SAMINOT1",332,0) ; "RTN","SAMINOT1",333,0) ; "RTN","SAMINOT1",334,0) MKNTLOC(vals,title,ndate,ntype,filter) ; extrinsic returns the "RTN","SAMINOT1",335,0) ; "RTN","SAMINOT1",336,0) ;location for the note "RTN","SAMINOT1",337,0) ; "RTN","SAMINOT1",338,0) n nien "RTN","SAMINOT1",339,0) s nien=$o(@vals@("notes",""),-1)+1 "RTN","SAMINOT1",340,0) s filter("nien")=nien "RTN","SAMINOT1",341,0) n nloc s nloc=$na(@vals@("notes",nien)) "RTN","SAMINOT1",342,0) s @nloc@("name")=title_" "_$g(ndate) "RTN","SAMINOT1",343,0) s @nloc@("date")=$g(ndate) "RTN","SAMINOT1",344,0) s @nloc@("type")=$g(ntype) "RTN","SAMINOT1",345,0) ; "RTN","SAMINOT1",346,0) quit $name(@nloc@("text")) ; end of $$MKNTLOC "RTN","SAMINOT1",347,0) ; "RTN","SAMINOT1",348,0) ; "RTN","SAMINOT1",349,0) ; "RTN","SAMINOT1",350,0) NTDTTM(ZFMDT) ; extrinsic returns the date and time in Note format "RTN","SAMINOT1",351,0) ; "RTN","SAMINOT1",352,0) ; ZFMDT is the fileman date/time to translate "RTN","SAMINOT1",353,0) ; "RTN","SAMINOT1",354,0) quit $$FMTE^XLFDT(ZFMDT,"5") ; end of $$NTDTTM "RTN","SAMINOT1",355,0) ; "RTN","SAMINOT1",356,0) ; "RTN","SAMINOT1",357,0) ; "RTN","SAMINOT1",358,0) NTLOCN(sid,form,nien) ; extrinsic returns the location of the Nth note "RTN","SAMINOT1",359,0) ; "RTN","SAMINOT1",360,0) n root s root=$$setroot^%wd("vapals-patients") "RTN","SAMINOT1",361,0) ; "RTN","SAMINOT1",362,0) quit $name(@root@("graph",sid,form,"notes",nien)) ; end of $$NTLOCN "RTN","SAMINOT1",363,0) ; "RTN","SAMINOT1",364,0) ; "RTN","SAMINOT1",365,0) ; "RTN","SAMINOT1",366,0) NTLAST(sid,form,ntype) ; extrinsic returns the location of the latest note "RTN","SAMINOT1",367,0) ; "RTN","SAMINOT1",368,0) ; of the type ntype "RTN","SAMINOT1",369,0) ; "RTN","SAMINOT1",370,0) quit ; end of NTLAST "RTN","SAMINOT1",371,0) ; "RTN","SAMINOT1",372,0) ; "RTN","SAMINOT1",373,0) ; "RTN","SAMINOT1",374,0) NTIEN(sid,form) ; extrinsic which returns the latest note for this form "RTN","SAMINOT1",375,0) ; "RTN","SAMINOT1",376,0) n root s root=$$setroot^%wd("vapals-patients") "RTN","SAMINOT1",377,0) n rtn s rtn=$o(@root@("graph",sid,form,"notes"," "),-1) "RTN","SAMINOT1",378,0) ; "RTN","SAMINOT1",379,0) quit rtn ; end of $$NTIEN "RTN","SAMINOT1",380,0) ; "RTN","SAMINOT1",381,0) ; "RTN","SAMINOT1",382,0) ; "RTN","SAMINOT1",383,0) NTLIST(nlist,sid,form) ; returns the note list in nlist, passed by ref "RTN","SAMINOT1",384,0) ; "RTN","SAMINOT1",385,0) n zn,root,gn "RTN","SAMINOT1",386,0) s root=$$setroot^%wd("vapals-patients") "RTN","SAMINOT1",387,0) s zn=0 "RTN","SAMINOT1",388,0) s gn=$na(@root@("graph",sid,form,"notes")) "RTN","SAMINOT1",389,0) q:'$d(@gn) "RTN","SAMINOT1",390,0) f s zn=$o(@gn@(zn)) q:+zn=0 d ; "RTN","SAMINOT1",391,0) . s @nlist@(zn,"name")=@gn@(zn,"name") "RTN","SAMINOT1",392,0) . s @nlist@(zn,"nien")=zn "RTN","SAMINOT1",393,0) ; "RTN","SAMINOT1",394,0) quit ; end of NTLIST "RTN","SAMINOT1",395,0) ; "RTN","SAMINOT1",396,0) ; "RTN","SAMINOT1",397,0) ; "RTN","SAMINOT1",398,0) TLST ; "RTN","SAMINOT1",399,0) ; "RTN","SAMINOT1",400,0) set SID="XXX00677" "RTN","SAMINOT1",401,0) set FORM="siform-2019-04-23" "RTN","SAMINOT1",402,0) do NTLIST("G",SID,FORM) "RTN","SAMINOT1",403,0) ;ZWR G "RTN","SAMINOT1",404,0) ; "RTN","SAMINOT1",405,0) quit ; end of TLST "RTN","SAMINOT1",406,0) ; "RTN","SAMINOT1",407,0) ; "RTN","SAMINOT1",408,0) ; "RTN","SAMINOT1",409,0) ELNOTE(vals,dest,cnt) ; eligibility NOTE TEXT "RTN","SAMINOT1",410,0) ; "RTN","SAMINOT1",411,0) D OUT("") "RTN","SAMINOT1",412,0) D OUT("Date of chart review: "_$$XVAL("sidc",vals)) "RTN","SAMINOT1",413,0) D GLOUT("The participant was identified as a potential lung screening candidate by: ") "RTN","SAMINOT1",414,0) D GLOUT($$XVAL("siceiden",vals),4) "RTN","SAMINOT1",415,0) if $$XVAL("siceiden",vals)="referral" d ; "RTN","SAMINOT1",416,0) . D OUT("Date of Referral: "_$$XVAL("sicerfdt",vals)) "RTN","SAMINOT1",417,0) . n spec s spec="" "RTN","SAMINOT1",418,0) . s:$$XVAL("sicerfpc",vals)="y" spec=spec_" Primary Care" "RTN","SAMINOT1",419,0) . s:$$XVAL("sicerfwh",vals)="y" spec=spec_" Women's Health" "RTN","SAMINOT1",420,0) . s:$$XVAL("sicerfge",vals)="y" spec=spec_" Geriatrics" "RTN","SAMINOT1",421,0) . s:$$XVAL("sicerfpu",vals)="y" spec=spec_" Pulmonology" "RTN","SAMINOT1",422,0) . s:$$XVAL("sicerfon",vals)="y" spec=spec_" Oncology" "RTN","SAMINOT1",423,0) . s:$$XVAL("sicerfsc",vals)="y" spec=spec_" Smoking Cessation" "RTN","SAMINOT1",424,0) . s:$$XVAL("sicerfot",vals)="y" spec=spec_" "_$$XVAL("sicerfoo",vals) "RTN","SAMINOT1",425,0) . D GLOUT("Specialty of referring provider: ") "RTN","SAMINOT1",426,0) . D GLOUT(spec,4) "RTN","SAMINOT1",427,0) n elig "RTN","SAMINOT1",428,0) s elig=$$XVAL("sicechrt",vals) "RTN","SAMINOT1",429,0) D OUT("The participant is eligible based on chart review: "_$s(elig="y":"Yes",1:"no")) "RTN","SAMINOT1",430,0) D OUT("") "RTN","SAMINOT1",431,0) s @vals@("chart-eligibility-complete")="true" "RTN","SAMINOT1",432,0) ; "RTN","SAMINOT1",433,0) quit ; end of ELNOTE "RTN","SAMINOT1",434,0) ; "RTN","SAMINOT1",435,0) ; "RTN","SAMINOT1",436,0) ; "RTN","SAMINOT1",437,0) PRENOTE(vals,dest,cnt) ; "RTN","SAMINOT1",438,0) ; "RTN","SAMINOT1",439,0) i $g(@vals@("sipedisc"))'="y" q ; no prelim discussion "RTN","SAMINOT1",440,0) D OUT("") "RTN","SAMINOT1",441,0) ;d OUT("A pre-enrollment discussion was held.") "RTN","SAMINOT1",442,0) ;[If Yes is selected then add the following 5 lines] "RTN","SAMINOT1",443,0) D OUT("The program attempted to reach the Veteran to discuss lung screening.") "RTN","SAMINOT1",444,0) D OUT("Date of pre-enrollment discussion: "_$$XVAL("sipedc",vals)) "RTN","SAMINOT1",445,0) n via s via="" "RTN","SAMINOT1",446,0) s:$$XVAL("sipecnip",vals)="1" via=via_" In person" "RTN","SAMINOT1",447,0) s:$$XVAL("sipecnte",vals)="1" via=via_" Telephone" "RTN","SAMINOT1",448,0) s:$$XVAL("sipecnth",vals)="1" via=via_" TeleHealth" "RTN","SAMINOT1",449,0) s:$$XVAL("sipecnml",vals)="1" via=via_" Mailed Letter" "RTN","SAMINOT1",450,0) s:$$XVAL("sipecnpp",vals)="1" via=via_" Message in patient portal" "RTN","SAMINOT1",451,0) s:$$XVAL("sipecnvd",vals)="1" via=via_" Video-on-Demand (VOD)" "RTN","SAMINOT1",452,0) s:$$XVAL("sipecnot",vals)="1" via=via_" "_$$XVAL("sipecnoo",vals) "RTN","SAMINOT1",453,0) ;D OUT("The lung screening program reached the potential candidate or was contacted via:"_via) "RTN","SAMINOT1",454,0) D GLOUT("The lung screening program reached the potential candidate or was contacted via:") "RTN","SAMINOT1",455,0) D GLOUT(via,4) "RTN","SAMINOT1",456,0) ;D OUT("The pre-enrollment discussion with the participant resulted in: "_$$SUBRSLT($$XVAL("siperslt",vals))) "RTN","SAMINOT1",457,0) D OUT("The pre-enrollment discussion with the participant resulted in: ") "RTN","SAMINOT1",458,0) D GLOUT($$SUBRSLT($$XVAL("siperslt",vals)),4) "RTN","SAMINOT1",459,0) D OUT("Comments: ") "RTN","SAMINOT1",460,0) D GLOUT($$XVAL("sipecmnt",vals),4) "RTN","SAMINOT1",461,0) ; "RTN","SAMINOT1",462,0) s @vals@("pre-note-complete")="true" "RTN","SAMINOT1",463,0) ; "RTN","SAMINOT1",464,0) quit ; end of PRENOTE "RTN","SAMINOT1",465,0) ; "RTN","SAMINOT1",466,0) ; "RTN","SAMINOT1",467,0) ; "RTN","SAMINOT1",468,0) SUBRSLT(XVAL) ; translation of discussion result "RTN","SAMINOT1",469,0) ; "RTN","SAMINOT1",470,0) q:XVAL="y" "Participant is interested in discussing lung screening. The program will proceed with enrollment process." "RTN","SAMINOT1",471,0) q:XVAL="u" "Participant is unsure of lung screening. Ok to contact in the future." "RTN","SAMINOT1",472,0) q:XVAL="nn" "Participant is not interested in discussing lung screening at this time. Ok to contact in the future." "RTN","SAMINOT1",473,0) q:XVAL="nf" "Participant is not interested in discussing lung screening in the future." "RTN","SAMINOT1",474,0) q:XVAL="na" "Unable to reach participant at this time" "RTN","SAMINOT1",475,0) ; "RTN","SAMINOT1",476,0) quit "" ; end of $$SUBRSLT "RTN","SAMINOT1",477,0) ; "RTN","SAMINOT1",478,0) ; "RTN","SAMINOT1",479,0) ; "RTN","SAMINOT1",480,0) INNOTE(vals,dest,cnt) ; "RTN","SAMINOT1",481,0) ; "RTN","SAMINOT1",482,0) ;Lung Screening Program Intake Note "RTN","SAMINOT1",483,0) ; "RTN","SAMINOT1",484,0) ;Date of intake discussion contact: [Date] "RTN","SAMINOT1",485,0) ;How did you learn about the Lung Screening Program?: [Selection] "RTN","SAMINOT1",486,0) ;Primary address verified: [Yes/No] "RTN","SAMINOT1",487,0) ;Rural status: [Urban/Rural/Unknown] "RTN","SAMINOT1",488,0) ;Preferred address and contact number: "RTN","SAMINOT1",489,0) ; [Address 1] "RTN","SAMINOT1",490,0) ; [Address 2] "RTN","SAMINOT1",491,0) ; [Address] "RTN","SAMINOT1",492,0) ; "RTN","SAMINOT1",493,0) ;Ever smoked?: [Ever Smoked Text] "RTN","SAMINOT1",494,0) ;Smoking Status: [Never Smoked/Past/Current/Willing to Quit] "RTN","SAMINOT1",495,0) ;CIGs per day: [Input Number] "RTN","SAMINOT1",496,0) ;PPD: [Computed Number] "RTN","SAMINOT1",497,0) ;# of years: [Input Number] "RTN","SAMINOT1",498,0) ;Pack Years: [Computed Number] "RTN","SAMINOT1",499,0) ; "RTN","SAMINOT1",500,0) ;[If a Quit Date is entered add the following line] "RTN","SAMINOT1",501,0) ;Quit smoking on: [Date] "RTN","SAMINOT1",502,0) ; "RTN","SAMINOT1",503,0) ;[If Smoking Cessation education text is entered add the following line] "RTN","SAMINOT1",504,0) ;Smoking cessation education provided: [Show Input Text] "RTN","SAMINOT1",505,0) ; "RTN","SAMINOT1",506,0) ;[If a Lung Cancer Dx date is entered show the following 1 to 2 lines] "RTN","SAMINOT1",507,0) ;Prior lung cancer diagnosis date: [Date] "RTN","SAMINOT1",508,0) ;[If a location not in the VA is specified show the next line] "RTN","SAMINOT1",509,0) ;Location where prior lung cancer diagnosis was made: [Location Text] "RTN","SAMINOT1",510,0) ; "RTN","SAMINOT1",511,0) ;[If Any Prior CT Date is entered show the following 1 to 2 lines] "RTN","SAMINOT1",512,0) ;Prior CT: [Date] "RTN","SAMINOT1",513,0) ;[If a location not in the VA is specified show the next line] "RTN","SAMINOT1",514,0) ;Location where prior lung cancer diagnosis was made: [Location Text] "RTN","SAMINOT1",515,0) ; "RTN","SAMINOT1",516,0) ;Shared Decision Making: "RTN","SAMINOT1",517,0) ; "RTN","SAMINOT1",518,0) d OUT(" ") "RTN","SAMINOT1",519,0) d OUT(" "_"Date of intake discussion contact: "_$$XVAL("sidc",vals)) "RTN","SAMINOT1",520,0) n learn s learn="" "RTN","SAMINOT1",521,0) s:$$XVAL("silnip",vals) learn=learn_" In person" "RTN","SAMINOT1",522,0) s:$$XVAL("silnph",vals) learn=learn_" Telephone" "RTN","SAMINOT1",523,0) s:$$XVAL("silnth",vals) learn=learn_" TeleHealth" "RTN","SAMINOT1",524,0) s:$$XVAL("silnml",vals) learn=learn_" Mailed letter" "RTN","SAMINOT1",525,0) s:$$XVAL("silnpp",vals) learn=learn_" Message in patient portal" "RTN","SAMINOT1",526,0) s:$$XVAL("silnvd",vals) learn=learn_" Video-on-Demand (VOD)" "RTN","SAMINOT1",527,0) s:$$XVAL("silnot",vals) learn=learn_" "_$$XVAL("silnoo",vals) "RTN","SAMINOT1",528,0) ;d GLOUT(" "_"How did you learn about the Lung Screening Program?: "_learn,4) "RTN","SAMINOT1",529,0) d GLOUT("How did you learn about the Lung Screening Program?: ",4) "RTN","SAMINOT1",530,0) d GLOUT(learn,6) "RTN","SAMINOT1",531,0) n verified s verified="" "RTN","SAMINOT1",532,0) s:$$XVAL("sipav",vals)="y" verified="Yes" "RTN","SAMINOT1",533,0) s:$$XVAL("sipav",vals)="n" verified="No" "RTN","SAMINOT1",534,0) d OUT(" "_"Primary address verified: "_verified) "RTN","SAMINOT1",535,0) n rural s rural="" "RTN","SAMINOT1",536,0) s:$$XVAL("sirs",vals)="r" rural="rural" "RTN","SAMINOT1",537,0) s:$$XVAL("sirs",vals)="u" rural="urban" "RTN","SAMINOT1",538,0) d OUT(" "_""_"Rural status: "_rural) "RTN","SAMINOT1",539,0) d OUT(" "_"Preferred address and contact number: ") "RTN","SAMINOT1",540,0) n pa s pa="" "RTN","SAMINOT1",541,0) i $$XVAL("sipsa",vals)'="" d ; "RTN","SAMINOT1",542,0) . d OUT(" "_$$XVAL("sipsa",vals)) "RTN","SAMINOT1",543,0) . n csz s csz="" "RTN","SAMINOT1",544,0) . s:$$XVAL("sipc",vals)'="" csz=$$XVAL("sipc",vals) "RTN","SAMINOT1",545,0) . s:$$XVAL("sips",vals)'="" csz=csz_", "_$$XVAL("sips",vals) "RTN","SAMINOT1",546,0) . s:$$XVAL("sipz",vals)'="" csz=csz_" "_$$XVAL("sipz",vals) "RTN","SAMINOT1",547,0) . d OUT(" "_csz) "RTN","SAMINOT1",548,0) d:$$XVAL("sippn",vals)'="" OUT(" "_$$XVAL("sippn",vals)) "RTN","SAMINOT1",549,0) d OUT(" "_"Ever smoked?: ") "RTN","SAMINOT1",550,0) d GLOUT($$XVAL("sies",vals),6) "RTN","SAMINOT1",551,0) n sstatus s sstatus="" "RTN","SAMINOT1",552,0) s:$$XVAL("siesm",vals)="n" sstatus=sstatus_" Never smoked" "RTN","SAMINOT1",553,0) s:$$XVAL("siesm",vals)="p" sstatus=sstatus_" Past" "RTN","SAMINOT1",554,0) s:$$XVAL("siesm",vals)="c" sstatus=sstatus_" Current" "RTN","SAMINOT1",555,0) s:$$XVAL("siesq",vals)=1 sstatus=sstatus_" Willing to quit" "RTN","SAMINOT1",556,0) d OUT(" Smoking Status: "_sstatus) "RTN","SAMINOT1",557,0) d OUT(" "_"CIGs per day: ") "RTN","SAMINOT1",558,0) d OUT(" "_$$XVAL("sicpd",vals)) "RTN","SAMINOT1",559,0) d OUT(" "_"PPD: ") "RTN","SAMINOT1",560,0) d OUT(" "_$$XVAL("sippd",vals)) "RTN","SAMINOT1",561,0) d OUT(" "_"# of years: ") "RTN","SAMINOT1",562,0) d OUT(" "_$$XVAL("sisny",vals)) "RTN","SAMINOT1",563,0) d OUT(" "_"PPY: ") "RTN","SAMINOT1",564,0) d OUT(" "_$$XVAL("sippy",vals)) "RTN","SAMINOT1",565,0) d OUT("") "RTN","SAMINOT1",566,0) i $$XVAL("siq",vals)'="" d ; "RTN","SAMINOT1",567,0) . d OUT("Quit smoking on: "_$$XVAL("siq",vals)) "RTN","SAMINOT1",568,0) . d OUT("") "RTN","SAMINOT1",569,0) i $$XVAL("sicep",vals)'="" d ; "RTN","SAMINOT1",570,0) . d OUT("Smoking cessation education provided:") "RTN","SAMINOT1",571,0) . d GLOUT(" "_$$XVAL("sicep",vals),4) "RTN","SAMINOT1",572,0) i $$XVAL("sicadx",vals)'="" d "RTN","SAMINOT1",573,0) . d OUT("Prior lung cancer diagnosis date: "_$$XVAL("sicadx",vals)) "RTN","SAMINOT1",574,0) . i $$XVAL("sicadxl",vals)'="" d ; "RTN","SAMINOT1",575,0) . . d OUT("Location where prior lung cancer diagnosis was made:") "RTN","SAMINOT1",576,0) . . d GLOUT(" "_$$XVAL("sicadxl",vals),4) "RTN","SAMINOT1",577,0) i $$XVAL("siptct",vals)'="" d "RTN","SAMINOT1",578,0) . d OUT("Prior CT: "_$$XVAL("siptct",vals)) "RTN","SAMINOT1",579,0) . i $$XVAL("siptctl",vals)'="" d ; "RTN","SAMINOT1",580,0) . . d OUT("Location where prior CT was made:") "RTN","SAMINOT1",581,0) . . d GLOUT(" "_$$XVAL("siptctl",vals),4) "RTN","SAMINOT1",582,0) d OUT(" ") "RTN","SAMINOT1",583,0) d OUT("Shared Decision Making: ") "RTN","SAMINOT1",584,0) d OUT(" ") "RTN","SAMINOT1",585,0) n shareddm "RTN","SAMINOT1",586,0) s shareddm=+$$XVAL("siidmdc",vals) "RTN","SAMINOT1",587,0) i shareddm=1 d SDM(dest) "RTN","SAMINOT1",588,0) e d OUT("Shared decision making was not applicable") "RTN","SAMINOT1",589,0) d OUT(" ") "RTN","SAMINOT1",590,0) n ldct s ldct="" "RTN","SAMINOT1",591,0) s:$$XVAL("sildct",vals)="n" ldct="No" "RTN","SAMINOT1",592,0) s:$$XVAL("sildct",vals)="l" ldct="No" "RTN","SAMINOT1",593,0) s:$$XVAL("sildct",vals)="y" ldct="Yes" "RTN","SAMINOT1",594,0) d GLOUT("The veteran has decided to enroll in the Lung Screening Program: "_ldct) "RTN","SAMINOT1",595,0) i $$XVAL("sildct",vals)="l" d ; "RTN","SAMINOT1",596,0) . d GLOUT("The veteran has indicated it is okay to contact in the future to discuss enrolling in the Lung Screening Program.",4) "RTN","SAMINOT1",597,0) i ldct="Yes" d ; "RTN","SAMINOT1",598,0) . d OUT("LDCT ordered: "_ldct) "RTN","SAMINOT1",599,0) . d OUT(" "_"Veteran enrolled in the LSS program. Results and coordination of care ") "RTN","SAMINOT1",600,0) . d OUT(" "_"will be made by the LSS team. ") "RTN","SAMINOT1",601,0) . i $$XVAL("siclin",vals)'="" d ; "RTN","SAMINOT1",602,0) . . quit "RTN","SAMINOT1",603,0) . quit "RTN","SAMINOT1",604,0) n tmpclin s tmpclin=$$XVAL("siclin",vals) "RTN","SAMINOT1",605,0) i tmpclin'="" d ; "RTN","SAMINOT1",606,0) . d OUT("Clinical Indications for Initial Screening CT:") "RTN","SAMINOT1",607,0) . d GLOUT(" "_tmpclin,4) "RTN","SAMINOT1",608,0) ; "RTN","SAMINOT1",609,0) ;The veteran has decided to enroll in the Lung Screening Program: [Yes/No] "RTN","SAMINOT1",610,0) ; "RTN","SAMINOT1",611,0) ;[If Not enroll at this time but okay to contact in the future, add the following line] "RTN","SAMINOT1",612,0) ;The veteran has indicated it is okay to contact in the future to discuss enrolling in the Lung Screening Program. "RTN","SAMINOT1",613,0) ; "RTN","SAMINOT1",614,0) ;[If Yes is answered for enrollment add the following two lines] "RTN","SAMINOT1",615,0) ;LDCT ordered: Yes "RTN","SAMINOT1",616,0) ;Veteran enrolled in the Lung Screening Program. Results and coordination of care will be made by the Lung Screening Program team. "RTN","SAMINOT1",617,0) ; "RTN","SAMINOT1",618,0) ;[If Clinical Indication text is provided add them to the note] "RTN","SAMINOT1",619,0) ;Clinical Indications: [Show Input Text] "RTN","SAMINOT1",620,0) ; "RTN","SAMINOT1",621,0) ; "RTN","SAMINOT1",622,0) quit ; end of INNOTE "RTN","SAMINOT1",623,0) ; "RTN","SAMINOT1",624,0) ; "RTN","SAMINOT1",625,0) ; "RTN","SAMINOT1",626,0) SDM(ary) ; adds Shared Decision Making text to array ary, passed by name "RTN","SAMINOT1",627,0) ; "RTN","SAMINOT1",628,0) n ii s ii=$o(@ary@(" "),-1) "RTN","SAMINOT1",629,0) s ii=ii+1 "RTN","SAMINOT1",630,0) s @ary@(ii)="Veteran of age and exposure to cigarette smoke as described above, and " "RTN","SAMINOT1",631,0) s ii=ii+1 "RTN","SAMINOT1",632,0) s @ary@(ii)="without a current diagnosis or obvious symptoms suggestive of lung cancer, " "RTN","SAMINOT1",633,0) s ii=ii+1 "RTN","SAMINOT1",634,0) s @ary@(ii)="has been educated today about the estimated risk for lung cancer, the " "RTN","SAMINOT1",635,0) s ii=ii+1 "RTN","SAMINOT1",636,0) s @ary@(ii)="possibility of cure or life prolonging if an early lung cancer were to be " "RTN","SAMINOT1",637,0) s ii=ii+1 "RTN","SAMINOT1",638,0) s @ary@(ii)="found during screening, the possibility of imaging abnormalities not being " "RTN","SAMINOT1",639,0) s ii=ii+1 "RTN","SAMINOT1",640,0) s @ary@(ii)="lung cancer, the possibility of complications from additional diagnostic " "RTN","SAMINOT1",641,0) s ii=ii+1 "RTN","SAMINOT1",642,0) s @ary@(ii)="procedures, and the approximate amount of radiation exposure associated " "RTN","SAMINOT1",643,0) s ii=ii+1 "RTN","SAMINOT1",644,0) s @ary@(ii)="with each screening procedure. In addition, the Veteran has been educated " "RTN","SAMINOT1",645,0) s ii=ii+1 "RTN","SAMINOT1",646,0) s @ary@(ii)="today about the importance of adhering to annual lung screening, the " "RTN","SAMINOT1",647,0) s ii=ii+1 "RTN","SAMINOT1",648,0) s @ary@(ii)="possible impact of other medical conditions on the overall health status, " "RTN","SAMINOT1",649,0) s ii=ii+1 "RTN","SAMINOT1",650,0) s @ary@(ii)="the importance of avoiding exposure to cigarette smoke, available tobacco " "RTN","SAMINOT1",651,0) s ii=ii+1 "RTN","SAMINOT1",652,0) s @ary@(ii)="cessation programs and available lung screening services at this site. " "RTN","SAMINOT1",653,0) s ii=ii+1 "RTN","SAMINOT1",654,0) s @ary@(ii)="Education material was provided to the veteran. " "RTN","SAMINOT1",655,0) s ii=ii+1 "RTN","SAMINOT1",656,0) ;s @ary@(ii)="Based on this information, the Veteran has opted for " "RTN","SAMINOT1",657,0) ; "RTN","SAMINOT1",658,0) quit ; end of SDM "RTN","SAMINOT1",659,0) ; "RTN","SAMINOT1",660,0) ; "RTN","SAMINOT1",661,0) ; "RTN","SAMINOT1",662,0) GLOUT(ln,indent) ; glob out first wrap ln then put it in dest "RTN","SAMINOT1",663,0) ; "RTN","SAMINOT1",664,0) i $$CRWRAP^SAMITTW(ln,dest,.cnt,80) q ; "RTN","SAMINOT1",665,0) n arytmp "RTN","SAMINOT1",666,0) s arytmp(1)=ln "RTN","SAMINOT1",667,0) i $g(indent)="" s indent=1 "RTN","SAMINOT1",668,0) d wrap^%tt("arytmp",indent_":80") "RTN","SAMINOT1",669,0) n ii s ii="" "RTN","SAMINOT1",670,0) f s ii=$o(arytmp(ii)) q:ii="" d ; "RTN","SAMINOT1",671,0) . d OUT(arytmp(ii)) "RTN","SAMINOT1",672,0) ; "RTN","SAMINOT1",673,0) quit ; end of GLOUT "RTN","SAMINOT1",674,0) ; "RTN","SAMINOT1",675,0) ; "RTN","SAMINOT1",676,0) ; "RTN","SAMINOT1",677,0) OUT(ln) ; "RTN","SAMINOT1",678,0) ; "RTN","SAMINOT1",679,0) i $$CRWRAP^SAMITTW(ln,dest,.cnt,80) q ; "RTN","SAMINOT1",680,0) ; "RTN","SAMINOT1",681,0) s cnt=cnt+1 "RTN","SAMINOT1",682,0) n lnn "RTN","SAMINOT1",683,0) ;s debug=1 "RTN","SAMINOT1",684,0) s lnn=$o(@dest@(" "),-1)+1 "RTN","SAMINOT1",685,0) s @dest@(lnn)=ln "RTN","SAMINOT1",686,0) ; "RTN","SAMINOT1",687,0) ;i $g(debug)=1 d ; "RTN","SAMINOT1",688,0) ;. i ln["<" q ; no markup "RTN","SAMINOT1",689,0) ;. n zs s zs=$STACK "RTN","SAMINOT1",690,0) ;. n zp s zp=$STACK(zs-2,"PLACE") "RTN","SAMINOT1",691,0) ;. s @dest@(lnn)=zp_":"_ln "RTN","SAMINOT1",692,0) ; "RTN","SAMINOT1",693,0) quit ; end of OUT "RTN","SAMINOT1",694,0) ; "RTN","SAMINOT1",695,0) ; "RTN","SAMINOT1",696,0) ; "RTN","SAMINOT1",697,0) XVAL(var,vals) ; extrinsic returns the patient value for var "RTN","SAMINOT1",698,0) ; "RTN","SAMINOT1",699,0) ; vals is passed by name "RTN","SAMINOT1",700,0) ; "RTN","SAMINOT1",701,0) n zr "RTN","SAMINOT1",702,0) s zr=$g(@vals@(var)) "RTN","SAMINOT1",703,0) ;i zr="" s zr="["_var_"]" "RTN","SAMINOT1",704,0) ; "RTN","SAMINOT1",705,0) quit zr ; end of $$XVAL "RTN","SAMINOT1",706,0) ; "RTN","SAMINOT1",707,0) ; "RTN","SAMINOT1",708,0) ; "RTN","SAMINOT1",709,0) EOR ; end of routine SAMINOT1 "RTN","SAMINOT2") 0^12^B473986639 "RTN","SAMINOT2",1,0) SAMINOT2 ;ven/gpl - followup form notes ;2021-07-01t17:21z "RTN","SAMINOT2",2,0) ;;18.0;SAMI;**1,9,12**;2020-01;Build 6 "RTN","SAMINOT2",3,0) ;;1.18.0.12-t3+i12 "RTN","SAMINOT2",4,0) ; "RTN","SAMINOT2",5,0) ; SAMINOT2 contains web services & other subroutines for producing "RTN","SAMINOT2",6,0) ; the ELCAP Followup Form Notes. "RTN","SAMINOT2",7,0) ; "RTN","SAMINOT2",8,0) quit ; no entry from top "RTN","SAMINOT2",9,0) ; "RTN","SAMINOT2",10,0) ; "RTN","SAMINOT2",11,0) ; "RTN","SAMINOT2",12,0) ;@section 0 primary development "RTN","SAMINOT2",13,0) ; "RTN","SAMINOT2",14,0) ; "RTN","SAMINOT2",15,0) ; "RTN","SAMINOT2",16,0) ;@license see routine SAMIUL "RTN","SAMINOT2",17,0) ;@documentation see SAMINUL "RTN","SAMINOT2",18,0) ;@contents "RTN","SAMINOT2",19,0) ; WSNOTE web service to return text note "RTN","SAMINOT2",20,0) ; $$NOTE create note "RTN","SAMINOT2",21,0) ; $$HASINNT is intake note present? "RTN","SAMINOT2",22,0) ; $$HASVCNT is communication note present? "RTN","SAMINOT2",23,0) ; $$HASLCSNT is lung cancer screening note present? "RTN","SAMINOT2",24,0) ; MKVC make communication note "RTN","SAMINOT2",25,0) ; MKLCS make lung cancer screening note "RTN","SAMINOT2",26,0) ; $$MKNT make note w/date=now "RTN","SAMINOT2",27,0) ; $$MKNTLOC make note "RTN","SAMINOT2",28,0) ; $$NTDTTM convert date/time fr/fm to/note format "RTN","SAMINOT2",29,0) ; $$NTLOCN location of nth note "RTN","SAMINOT2",30,0) ; $$NTLAST location of latest note of a type "RTN","SAMINOT2",31,0) ; NTLIST return note list "RTN","SAMINOT2",32,0) ; TLST test NTLIST "RTN","SAMINOT2",33,0) ; VCNOTE veteran communication note "RTN","SAMINOT2",34,0) ; SSTATUS smoking status "RTN","SAMINOT2",35,0) ; LCSNOTE lung cancer screening note "RTN","SAMINOT2",36,0) ; OUT output new line to note "RTN","SAMINOT2",37,0) ; $$XVAL value of form variable "RTN","SAMINOT2",38,0) ; $$PREVCT key to previous ct eval form "RTN","SAMINOT2",39,0) ; CTINFO extracts from latest ct eval form "RTN","SAMINOT2",40,0) ; IMPRESS impressions from ct eval report "RTN","SAMINOT2",41,0) ; $$XSUB dictionary value for variable "RTN","SAMINOT2",42,0) ; "RTN","SAMINOT2",43,0) ; "RTN","SAMINOT2",44,0) ; "RTN","SAMINOT2",45,0) ;@section 1 wsi WSNOTE & related subroutines "RTN","SAMINOT2",46,0) ; "RTN","SAMINOT2",47,0) ; "RTN","SAMINOT2",48,0) ; "RTN","SAMINOT2",49,0) ;@wsi WSNOTE^SAMINOT2, vapals-elcap followup note "RTN","SAMINOT2",50,0) WSNOTE(return,filter) ; web service to return text note "RTN","SAMINOT2",51,0) ; "RTN","SAMINOT2",52,0) ;ven/gpl;web service;procedure; "RTN","SAMINOT2",53,0) ; "RTN","SAMINOT2",54,0) n debug s debug=0 "RTN","SAMINOT2",55,0) i $g(filter("debug"))=1 s debug=1 "RTN","SAMINOT2",56,0) ; "RTN","SAMINOT2",57,0) k return "RTN","SAMINOT2",58,0) s HTTPRSP("mime")="text/html" "RTN","SAMINOT2",59,0) ; "RTN","SAMINOT2",60,0) n si "RTN","SAMINOT2",61,0) s si=$g(filter("studyid")) "RTN","SAMINOT2",62,0) i si="" d ; "RTN","SAMINOT2",63,0) . s si="XXX00333" "RTN","SAMINOT2",64,0) q:si="" "RTN","SAMINOT2",65,0) ; "RTN","SAMINOT2",66,0) n samikey "RTN","SAMINOT2",67,0) s samikey=$g(filter("form")) "RTN","SAMINOT2",68,0) n root s root=$$setroot^%wd("vapals-patients") "RTN","SAMINOT2",69,0) i samikey="" d ; "RTN","SAMINOT2",70,0) . s samikey=$o(@root@("graph",si,"siform")) "RTN","SAMINOT2",71,0) . ;w !,samikey "RTN","SAMINOT2",72,0) . ;b "RTN","SAMINOT2",73,0) ; "RTN","SAMINOT2",74,0) n vals "RTN","SAMINOT2",75,0) m vals=@root@("graph",si,samikey) "RTN","SAMINOT2",76,0) ; "RTN","SAMINOT2",77,0) n note,nien,ntype "RTN","SAMINOT2",78,0) s ntype="" "RTN","SAMINOT2",79,0) s note="" "RTN","SAMINOT2",80,0) s nien=$g(filter("nien")) "RTN","SAMINOT2",81,0) i nien="" d "RTN","SAMINOT2",82,0) . s:$g(vals("samistatus"))="complete" ntype="intake" "RTN","SAMINOT2",83,0) . s:$g(vals("samistatus"))="chart-eligibility" ntype="eligibility" "RTN","SAMINOT2",84,0) . s:$g(vals("samistatus"))="pre-enrollment-discussion" ntype="pre-note" "RTN","SAMINOT2",85,0) . q:ntype="" "RTN","SAMINOT2",86,0) . ;d nien=$$NTTYPE add code to pull the latest note by type "RTN","SAMINOT2",87,0) q:nien="" "RTN","SAMINOT2",88,0) n notebase "RTN","SAMINOT2",89,0) s notebase=$$NTLOCN(si,samikey,nien) ; global location for the note "RTN","SAMINOT2",90,0) s note=$na(@notebase@("text")) "RTN","SAMINOT2",91,0) i '$d(@note) q "RTN","SAMINOT2",92,0) ; "RTN","SAMINOT2",93,0) new temp,tout "RTN","SAMINOT2",94,0) do GETTMPL^SAMICASE("temp","vapals:note") "RTN","SAMINOT2",95,0) quit:'$data(temp) "RTN","SAMINOT2",96,0) ; "RTN","SAMINOT2",97,0) n cnt s cnt=0 "RTN","SAMINOT2",98,0) n zi s zi="" "RTN","SAMINOT2",99,0) ; "RTN","SAMINOT2",100,0) f s zi=$o(temp(zi)) q:zi="" d ; "RTN","SAMINOT2",101,0) . ; "RTN","SAMINOT2",102,0) . n line s line=temp(zi) "RTN","SAMINOT2",103,0) . D LOAD^SAMIFORM(.line,samikey,si,.filter,.vals) "RTN","SAMINOT2",104,0) . s temp(zi)=line "RTN","SAMINOT2",105,0) . ; "RTN","SAMINOT2",106,0) . s cnt=cnt+1 "RTN","SAMINOT2",107,0) . s tout(cnt)=temp(zi) "RTN","SAMINOT2",108,0) . ; "RTN","SAMINOT2",109,0) . i temp(zi)["report-text" d ; "RTN","SAMINOT2",110,0) . . i temp(zi)["#" q ; "RTN","SAMINOT2",111,0) . . n zj s zj="" "RTN","SAMINOT2",112,0) . . f s zj=$o(@note@(zj)) q:zj="" d ; "RTN","SAMINOT2",113,0) . . . s cnt=cnt+1 "RTN","SAMINOT2",114,0) . . . ;s tout(cnt)=@note@(zj)_"<br>" "RTN","SAMINOT2",115,0) . . . s tout(cnt)=@note@(zj)_$char(13,10) "RTN","SAMINOT2",116,0) m return=tout "RTN","SAMINOT2",117,0) ; "RTN","SAMINOT2",118,0) quit ; end of wsi WSNOTE^SAMINOT2 "RTN","SAMINOT2",119,0) ; "RTN","SAMINOT2",120,0) ; "RTN","SAMINOT2",121,0) ; "RTN","SAMINOT2",122,0) NOTE(filter) ; extrnisic to create note "RTN","SAMINOT2",123,0) ; "RTN","SAMINOT2",124,0) ;ven/gpl;private;function; "RTN","SAMINOT2",125,0) ;@output = 1 if successful, 0 if not "RTN","SAMINOT2",126,0) ; "RTN","SAMINOT2",127,0) k ^gpl("funote") "RTN","SAMINOT2",128,0) m ^gpl("funote")=filter "RTN","SAMINOT2",129,0) ;q 0 ; while we are developing "RTN","SAMINOT2",130,0) ; "RTN","SAMINOT2",131,0) ; set up patient values "RTN","SAMINOT2",132,0) ; "RTN","SAMINOT2",133,0) n vals "RTN","SAMINOT2",134,0) ; "RTN","SAMINOT2",135,0) n si "RTN","SAMINOT2",136,0) s si=$g(filter("studyid")) "RTN","SAMINOT2",137,0) q:si="" 0 "RTN","SAMINOT2",138,0) ; "RTN","SAMINOT2",139,0) n samikey "RTN","SAMINOT2",140,0) s samikey=$g(filter("form")) "RTN","SAMINOT2",141,0) q:samikey="" 0 "RTN","SAMINOT2",142,0) n root s root=$$setroot^%wd("vapals-patients") "RTN","SAMINOT2",143,0) ; "RTN","SAMINOT2",144,0) s vals=$na(@root@("graph",si,samikey)) "RTN","SAMINOT2",145,0) ; "RTN","SAMINOT2",146,0) i '$d(@vals) d q 0 ; "RTN","SAMINOT2",147,0) . ;w !,"error, patient values not found" "RTN","SAMINOT2",148,0) ;zwr @vals@(*) "RTN","SAMINOT2",149,0) ; "RTN","SAMINOT2",150,0) k ^SAMIUL("NOTE") "RTN","SAMINOT2",151,0) m ^SAMIUL("NOTE","vals")=@vals "RTN","SAMINOT2",152,0) m ^SAMIUL("NOTE","filter")=filter "RTN","SAMINOT2",153,0) ; "RTN","SAMINOT2",154,0) n didnote s didnote=0 "RTN","SAMINOT2",155,0) ; "RTN","SAMINOT2",156,0) i $d(@vals@("notes")) d q didnote ; "RTN","SAMINOT2",157,0) . s filter("errorMessage")="Note already exists for this form." "RTN","SAMINOT2",158,0) ; "RTN","SAMINOT2",159,0) i $g(@vals@("futype"))="other" d ; "RTN","SAMINOT2",160,0) . i $g(@vals@("samistatus"))'="complete" q ; "RTN","SAMINOT2",161,0) . ;q:$$HASVCNT(vals) "RTN","SAMINOT2",162,0) . d MKVC(si,samikey,vals,.filter) ; "RTN","SAMINOT2",163,0) . s didnote=1 "RTN","SAMINOT2",164,0) ; "RTN","SAMINOT2",165,0) i $g(@vals@("futype"))="ct" d ; "RTN","SAMINOT2",166,0) . i $g(@vals@("samistatus"))'="complete" q ; "RTN","SAMINOT2",167,0) . ;q:$$HASLCSNT(vals) "RTN","SAMINOT2",168,0) . n ctdt,ctkey "RTN","SAMINOT2",169,0) . s ctdt=$$LASTCMP^SAMICAS3(si,.ctkey) "RTN","SAMINOT2",170,0) . i ctdt=-1 d q ; "RTN","SAMINOT2",171,0) . . s filter("errorMessage")="No CT Eval form exists, followup note not created." "RTN","SAMINOT2",172,0) . d MKLCS(si,samikey,vals,.filter) ; "RTN","SAMINOT2",173,0) . s didnote=1 "RTN","SAMINOT2",174,0) ; "RTN","SAMINOT2",175,0) ;i $g(@vals@("samistatus"))="complete" d ; "RTN","SAMINOT2",176,0) ;. q:$$HASVCNT(vals) "RTN","SAMINOT2",177,0) ;. d MKVC(si,samikey,vals,.filter) ; "RTN","SAMINOT2",178,0) ;. s didnote=1 "RTN","SAMINOT2",179,0) ; "RTN","SAMINOT2",180,0) quit didnote ; end of $$NOTE "RTN","SAMINOT2",181,0) ; "RTN","SAMINOT2",182,0) ; "RTN","SAMINOT2",183,0) ; "RTN","SAMINOT2",184,0) HASINNT(vals) ; is intake note present? "RTN","SAMINOT2",185,0) ; "RTN","SAMINOT2",186,0) ;ven/gpl;private;function; "RTN","SAMINOT2",187,0) ;@output = 1 if intake note is present, 0 if not "RTN","SAMINOT2",188,0) ; "RTN","SAMINOT2",189,0) n zzi,zzrtn s (zzi,zzrtn)=0 "RTN","SAMINOT2",190,0) q:'$d(@vals) "RTN","SAMINOT2",191,0) f s zzi=$o(@vals@("notes",zzi)) q:+zzi=0 d ; "RTN","SAMINOT2",192,0) . i $g(@vals@("notes",zzi,"name"))["Intake" s zzrtn=1 "RTN","SAMINOT2",193,0) ; "RTN","SAMINOT2",194,0) quit zzrtn ; end of $$HASINNT "RTN","SAMINOT2",195,0) ; "RTN","SAMINOT2",196,0) ; "RTN","SAMINOT2",197,0) ; "RTN","SAMINOT2",198,0) HASVCNT(vals) ; is communication note present? "RTN","SAMINOT2",199,0) ; "RTN","SAMINOT2",200,0) ;ven/gpl;private;function; "RTN","SAMINOT2",201,0) ;@output = 1 if communication note is present, 0 if not "RTN","SAMINOT2",202,0) ; "RTN","SAMINOT2",203,0) n zzi,zzrtn s (zzi,zzrtn)=0 "RTN","SAMINOT2",204,0) q:'$d(@vals) "RTN","SAMINOT2",205,0) f s zzi=$o(@vals@("notes",zzi)) q:+zzi=0 d ; "RTN","SAMINOT2",206,0) . i $g(@vals@("notes",zzi,"name"))["Communication" s zzrtn=1 "RTN","SAMINOT2",207,0) ; "RTN","SAMINOT2",208,0) quit zzrtn ; end of $$HASVCNT "RTN","SAMINOT2",209,0) ; "RTN","SAMINOT2",210,0) ; "RTN","SAMINOT2",211,0) ; "RTN","SAMINOT2",212,0) HASLCSNT(vals) ; is lung cancer screening note present? "RTN","SAMINOT2",213,0) ; "RTN","SAMINOT2",214,0) ;ven/gpl;private;function; "RTN","SAMINOT2",215,0) ;@output = 1 if communication note is present, 0 if not "RTN","SAMINOT2",216,0) ; "RTN","SAMINOT2",217,0) n zzi,zzrtn s (zzi,zzrtn)=0 "RTN","SAMINOT2",218,0) q:'$d(@vals) "RTN","SAMINOT2",219,0) f s zzi=$o(@vals@("notes",zzi)) q:+zzi=0 d ; "RTN","SAMINOT2",220,0) . i $g(@vals@("notes",zzi,"name"))["Lung" s zzrtn=1 "RTN","SAMINOT2",221,0) ; "RTN","SAMINOT2",222,0) quit zzrtn ; end of $$HASLCSNT "RTN","SAMINOT2",223,0) ; "RTN","SAMINOT2",224,0) ; "RTN","SAMINOT2",225,0) ; "RTN","SAMINOT2",226,0) MKVC(sid,form,vals,filter) ; make communication note "RTN","SAMINOT2",227,0) ; "RTN","SAMINOT2",228,0) ;ven/gpl;private;procedure; "RTN","SAMINOT2",229,0) ; "RTN","SAMINOT2",230,0) n cnt s cnt=0 "RTN","SAMINOT2",231,0) ;n dest s dest=$na(@vals@("communication-note")) "RTN","SAMINOT2",232,0) n dest s dest=$$MKNT(vals,"Communication Note","communication",.filter) "RTN","SAMINOT2",233,0) k @dest "RTN","SAMINOT2",234,0) d OUT("Veteran Communication Note") "RTN","SAMINOT2",235,0) d OUT("") "RTN","SAMINOT2",236,0) d VCNOTE(vals,dest,cnt) "RTN","SAMINOT2",237,0) ; "RTN","SAMINOT2",238,0) quit ; end of MKVC "RTN","SAMINOT2",239,0) ; "RTN","SAMINOT2",240,0) ; "RTN","SAMINOT2",241,0) ; "RTN","SAMINOT2",242,0) MKLCS(sid,form,vals,filter) ; make lung cancer screening note "RTN","SAMINOT2",243,0) ; "RTN","SAMINOT2",244,0) ;ven/gpl;private;procedure; "RTN","SAMINOT2",245,0) ; "RTN","SAMINOT2",246,0) n cnt s cnt=0 "RTN","SAMINOT2",247,0) ;n dest s dest=$na(@vals@("lcs-note")) "RTN","SAMINOT2",248,0) n dest s dest=$$MKNT(vals,"Lung Cancer Screening Note","lcs",.filter) "RTN","SAMINOT2",249,0) k @dest "RTN","SAMINOT2",250,0) d OUT("Lung Screening and Surveillance Follow up Note") "RTN","SAMINOT2",251,0) d OUT("") "RTN","SAMINOT2",252,0) d LCSNOTE(vals,dest,cnt) "RTN","SAMINOT2",253,0) ; "RTN","SAMINOT2",254,0) quit ; end of MKLCS "RTN","SAMINOT2",255,0) ; "RTN","SAMINOT2",256,0) ; "RTN","SAMINOT2",257,0) ; "RTN","SAMINOT2",258,0) MKNT(vals,title,ntype,filter) ; make note w/date=now "RTN","SAMINOT2",259,0) ; "RTN","SAMINOT2",260,0) ;ven/gpl;private;pseudo-function; "RTN","SAMINOT2",261,0) ;@input "RTN","SAMINOT2",262,0) ; .filter (passed by reference) "RTN","SAMINOT2",263,0) ;@output = global address "RTN","SAMINOT2",264,0) ; "RTN","SAMINOT2",265,0) n ntdt s ntdt=$$NTDTTM($$NOW^XLFDT) "RTN","SAMINOT2",266,0) n ntptr "RTN","SAMINOT2",267,0) s ntptr=$$MKNTLOC(vals,title,ntdt,$g(ntype),.filter) "RTN","SAMINOT2",268,0) ; "RTN","SAMINOT2",269,0) quit ntptr ; end of $$MKNT "RTN","SAMINOT2",270,0) ; "RTN","SAMINOT2",271,0) ; "RTN","SAMINOT2",272,0) ; "RTN","SAMINOT2",273,0) MKNTLOC(vals,title,ndate,ntype,filter) ; make note "RTN","SAMINOT2",274,0) ; "RTN","SAMINOT2",275,0) ;ven/gpl;private;pseudo-function; "RTN","SAMINOT2",276,0) ;@output = note location (global address) "RTN","SAMINOT2",277,0) ; "RTN","SAMINOT2",278,0) n nien "RTN","SAMINOT2",279,0) s nien=$o(@vals@("notes",""),-1)+1 "RTN","SAMINOT2",280,0) s filter("nien")=nien "RTN","SAMINOT2",281,0) n nloc s nloc=$na(@vals@("notes",nien)) "RTN","SAMINOT2",282,0) s @nloc@("name")=title_" "_$g(ndate) "RTN","SAMINOT2",283,0) s @nloc@("date")=$g(ndate) "RTN","SAMINOT2",284,0) s @nloc@("type")=$g(ntype) "RTN","SAMINOT2",285,0) ; "RTN","SAMINOT2",286,0) quit $na(@nloc@("text")) "RTN","SAMINOT2",287,0) ; "RTN","SAMINOT2",288,0) ; "RTN","SAMINOT2",289,0) ; "RTN","SAMINOT2",290,0) NTDTTM(ZFMDT) ; convert date/time fr/fm to/note format "RTN","SAMINOT2",291,0) ; "RTN","SAMINOT2",292,0) ;ven/gpl;private;function; "RTN","SAMINOT2",293,0) ;@input "RTN","SAMINOT2",294,0) ; ZFMDT = fileman date/time to translate "RTN","SAMINOT2",295,0) ;@output = date/time in note format "RTN","SAMINOT2",296,0) ; "RTN","SAMINOT2",297,0) quit $$FMTE^XLFDT(ZFMDT,"5") ; end of $$NTDTTM "RTN","SAMINOT2",298,0) ; "RTN","SAMINOT2",299,0) ; "RTN","SAMINOT2",300,0) ; "RTN","SAMINOT2",301,0) NTLOCN(sid,form,nien) ; location of nth note "RTN","SAMINOT2",302,0) ; "RTN","SAMINOT2",303,0) ;ven/gpl;private;function; "RTN","SAMINOT2",304,0) ;@output = global location of Nth note "RTN","SAMINOT2",305,0) ; "RTN","SAMINOT2",306,0) n root s root=$$setroot^%wd("vapals-patients") "RTN","SAMINOT2",307,0) ; "RTN","SAMINOT2",308,0) quit $na(@root@("graph",sid,form,"notes",nien)) ; end of $$NTLOCN "RTN","SAMINOT2",309,0) ; "RTN","SAMINOT2",310,0) ; "RTN","SAMINOT2",311,0) ; "RTN","SAMINOT2",312,0) NTLAST(sid,form,ntype) ; location of latest note of a type "RTN","SAMINOT2",313,0) ; "RTN","SAMINOT2",314,0) ;ven/gpl;private;function; "RTN","SAMINOT2",315,0) ;@input "RTN","SAMINOT2",316,0) ; ntype = type of note "RTN","SAMINOT2",317,0) ;@output = global location of latest note of type ntype "RTN","SAMINOT2",318,0) ; "RTN","SAMINOT2",319,0) ; not yet written "RTN","SAMINOT2",320,0) ; "RTN","SAMINOT2",321,0) quit ; end of $$NTLAST "RTN","SAMINOT2",322,0) ; "RTN","SAMINOT2",323,0) ; "RTN","SAMINOT2",324,0) ; "RTN","SAMINOT2",325,0) NTLIST(nlist,sid,form) ; return note list "RTN","SAMINOT2",326,0) ; "RTN","SAMINOT2",327,0) ;ven/gpl;private;procedure; "RTN","SAMINOT2",328,0) ;@output "RTN","SAMINOT2",329,0) ; .nlist = note list [pass by reference] "RTN","SAMINOT2",330,0) ; "RTN","SAMINOT2",331,0) n zn,root,gn "RTN","SAMINOT2",332,0) s root=$$setroot^%wd("vapals-patients") "RTN","SAMINOT2",333,0) s zn=0 "RTN","SAMINOT2",334,0) s gn=$na(@root@("graph",sid,form,"notes")) "RTN","SAMINOT2",335,0) q:'$d(@gn) "RTN","SAMINOT2",336,0) f s zn=$o(@gn@(zn)) q:+zn=0 d ; "RTN","SAMINOT2",337,0) . s @nlist@(zn,"name")=@gn@(zn,"name") "RTN","SAMINOT2",338,0) . s @nlist@(zn,"nien")=zn "RTN","SAMINOT2",339,0) ; "RTN","SAMINOT2",340,0) quit ; end of NTLIST "RTN","SAMINOT2",341,0) ; "RTN","SAMINOT2",342,0) ; "RTN","SAMINOT2",343,0) ; "RTN","SAMINOT2",344,0) TLST ; test NTLIST "RTN","SAMINOT2",345,0) ; "RTN","SAMINOT2",346,0) ;ven/gpl;test;procedure; "RTN","SAMINOT2",347,0) ; "RTN","SAMINOT2",348,0) set SID="XXX00677" "RTN","SAMINOT2",349,0) set FORM="siform-2019-04-23" "RTN","SAMINOT2",350,0) do NTLIST("G",SID,FORM) "RTN","SAMINOT2",351,0) ; "RTN","SAMINOT2",352,0) ; zwrite G "RTN","SAMINOT2",353,0) ; "RTN","SAMINOT2",354,0) quit ; end of TLST "RTN","SAMINOT2",355,0) ; "RTN","SAMINOT2",356,0) ; "RTN","SAMINOT2",357,0) ; "RTN","SAMINOT2",358,0) VCNOTE(vals,dest,cnt) ; veteran communication note "RTN","SAMINOT2",359,0) ; "RTN","SAMINOT2",360,0) ;ven/gpl;private;procedure; "RTN","SAMINOT2",361,0) ; "RTN","SAMINOT2",362,0) ; do OUT("") "RTN","SAMINOT2",363,0) ; "RTN","SAMINOT2",364,0) d OUT("Veteran was contacted via:") "RTN","SAMINOT2",365,0) n sp1 s sp1=" " "RTN","SAMINOT2",366,0) d:$$XVAL("fucmotip",vals) OUT(sp1_"In person") "RTN","SAMINOT2",367,0) d:$$XVAL("fucmotte",vals) OUT(sp1_"Telephone") "RTN","SAMINOT2",368,0) d:$$XVAL("fucmotth",vals) OUT(sp1_"TeleHealth") "RTN","SAMINOT2",369,0) d:$$XVAL("fucmotml",vals) OUT(sp1_"Mailed Letter") "RTN","SAMINOT2",370,0) d:$$XVAL("fucmotpp",vals) OUT(sp1_"Message in patient portal") "RTN","SAMINOT2",371,0) d:$$XVAL("fucmotvd",vals) OUT(sp1_"Video-on-demand (VOD)") "RTN","SAMINOT2",372,0) d:$$XVAL("fucmotot",vals) OUT(sp1_"Other: "_$$XVAL("fucmotoo",vals)) "RTN","SAMINOT2",373,0) d OUT("") "RTN","SAMINOT2",374,0) ; "RTN","SAMINOT2",375,0) d:$$XVAL("fucmotde",vals)'="" "RTN","SAMINOT2",376,0) . d OUT("Communication details:") "RTN","SAMINOT2",377,0) . d OUT(sp1_$$XVAL("fucmotde",vals)) "RTN","SAMINOT2",378,0) ; "RTN","SAMINOT2",379,0) d SSTATUS(vals) ; insert smoking status section "RTN","SAMINOT2",380,0) ; "RTN","SAMINOT2",381,0) quit ; end of VCNOTE "RTN","SAMINOT2",382,0) ; "RTN","SAMINOT2",383,0) ; "RTN","SAMINOT2",384,0) ; "RTN","SAMINOT2",385,0) SSTATUS(vals) ; smoking status "RTN","SAMINOT2",386,0) ; "RTN","SAMINOT2",387,0) ;ven/gpl;private;procedure; "RTN","SAMINOT2",388,0) ; "RTN","SAMINOT2",389,0) n sstat s sstat="" "RTN","SAMINOT2",390,0) i $$XVAL("sisa",vals)="y" d ; "RTN","SAMINOT2",391,0) . s sstat="Current" "RTN","SAMINOT2",392,0) . d OUT("Smoking status: "_sstat) "RTN","SAMINOT2",393,0) . d OUT(sp1_"Current cigarette smoker (patient advised that active tobacco use") "RTN","SAMINOT2",394,0) . d OUT(sp1_"increases risk of future lung cancer, heart disease and stroke,") "RTN","SAMINOT2",395,0) . d OUT(sp1_"advised stability now does not guarantee will not develop future") "RTN","SAMINOT2",396,0) . d OUT(sp1_"lung cancer or risks of premature death from tobacco related heart") "RTN","SAMINOT2",397,0) . d OUT(sp1_"disease and stroke)") "RTN","SAMINOT2",398,0) i $$XVAL("sisa",vals)="n" d ; "RTN","SAMINOT2",399,0) . s sstat="Former" "RTN","SAMINOT2",400,0) . d OUT("Smoking status: "_sstat) "RTN","SAMINOT2",401,0) . n qdate s qdate="" "RTN","SAMINOT2",402,0) . s qdate=$$XVAL("siq",vals) "RTN","SAMINOT2",403,0) . i qdate'="" d OUT(sp1_"Former cigarette smoker. Quit date: "_qdate) "RTN","SAMINOT2",404,0) . e d OUT(sp1_"Former cigarette smoker.") "RTN","SAMINOT2",405,0) i $$XVAL("sisa",vals)="o" d ; "RTN","SAMINOT2",406,0) . s sstat="Never" "RTN","SAMINOT2",407,0) . d OUT("Smoking status: "_sstat) "RTN","SAMINOT2",408,0) . d OUT(sp1_"Never cigarette smoker") "RTN","SAMINOT2",409,0) ; "RTN","SAMINOT2",410,0) n cumary "RTN","SAMINOT2",411,0) d CUMPY^SAMIUR2("cumary",sid,form) "RTN","SAMINOT2",412,0) k ^gpl("funote","cumary") "RTN","SAMINOT2",413,0) m ^gpl("funote","cumary")=cumary "RTN","SAMINOT2",414,0) n cur s cur=$g(cumary("current")) "RTN","SAMINOT2",415,0) n newcum s newcum=$g(cumary("rpt",cur,4)) ; new cumulative pack years "RTN","SAMINOT2",416,0) ; "RTN","SAMINOT2",417,0) i $$XVAL("sisa",vals)="y" d ; "RTN","SAMINOT2",418,0) . d OUT("Smoking history (since last visit):") "RTN","SAMINOT2",419,0) . d OUT(sp1_"Cigarettes/day: "_$$XVAL("sicpd",vals)) "RTN","SAMINOT2",420,0) . d OUT(sp1_"PPD: "_$$XVAL("sippd",vals)) "RTN","SAMINOT2",421,0) . d OUT(sp1_"Current cumulative pack years: "_newcum) "RTN","SAMINOT2",422,0) i $$XVAL("sisa",vals)'="y" d ; "RTN","SAMINOT2",423,0) . d OUT("Smoking History") "RTN","SAMINOT2",424,0) n zi "RTN","SAMINOT2",425,0) f zi=1:1:cur d ; "RTN","SAMINOT2",426,0) . d OUT(sp1_cumary("rpt",zi,1)_" "_cumary("rpt",zi,2)) "RTN","SAMINOT2",427,0) . d OUT(sp1_sp1_"Pack Years: "_cumary("rpt",zi,3)) "RTN","SAMINOT2",428,0) . d OUT(sp1_sp1_"Cumulative: "_cumary("rpt",zi,4)) "RTN","SAMINOT2",429,0) ; "RTN","SAMINOT2",430,0) n tried s tried=$$XVAL("sittq",vals) "RTN","SAMINOT2",431,0) n ptried s ptried=$s(tried="y":"Yes",tried="n":"No",tried="o":"Not applicable",1:"") "RTN","SAMINOT2",432,0) i ptried'="" d OUT("Since your prior CT scan have you ever tried to quit smoking? "_ptried) "RTN","SAMINOT2",433,0) ; "RTN","SAMINOT2",434,0) n tryary,cnt "RTN","SAMINOT2",435,0) s cnt=0 "RTN","SAMINOT2",436,0) i $$XVAL("sisca",vals)'="" s cnt=cnt+1 s tryary(cnt)="Have not tried to quit" "RTN","SAMINOT2",437,0) i $$XVAL("siscb",vals)'="" s cnt=cnt+1 s tryary(cnt)="""Cold Turkey"" by completely stopping on your own with no other assistance" "RTN","SAMINOT2",438,0) i $$XVAL("siscc",vals)'="" s cnt=cnt+1 s tryary(cnt)="Tapering or reducing number of cigarettes smoked per day" "RTN","SAMINOT2",439,0) i $$XVAL("siscd",vals)'="" s cnt=cnt+1 s tryary(cnt)="Self-help material (e.g., brochure, cessation website)" "RTN","SAMINOT2",440,0) i $$XVAL("sisce",vals)'="" s cnt=cnt+1 s tryary(cnt)="Individual consultation or cessation counseling" "RTN","SAMINOT2",441,0) i $$XVAL("siscf",vals)'="" s cnt=cnt+1 s tryary(cnt)="Telephone cessation counseling hotline (e.g., 1-855-QUIT-VET, 1-800-QUIT-NOW)" "RTN","SAMINOT2",442,0) i $$XVAL("siscg",vals)'="" s cnt=cnt+1 s tryary(cnt)="Peer support (e.g., Nicotine Anonymous)" "RTN","SAMINOT2",443,0) i $$XVAL("sisch",vals)'="" s cnt=cnt+1 s tryary(cnt)="Nicotine replacement therapy (e.g., patch, gum, inhaler, nasal spray, lozenge)" "RTN","SAMINOT2",444,0) i $$XVAL("sisci",vals)'="" s cnt=cnt+1 s tryary(cnt)="Zyban" "RTN","SAMINOT2",445,0) i $$XVAL("siscj",vals)'="" s cnt=cnt+1 s tryary(cnt)="Hypnosis" "RTN","SAMINOT2",446,0) i $$XVAL("sisck",vals)'="" s cnt=cnt+1 s tryary(cnt)="Acupuncture / acupressure" "RTN","SAMINOT2",447,0) n tryot s tryot="" "RTN","SAMINOT2",448,0) i $$XVAL("siscl",vals)'="" d ; "RTN","SAMINOT2",449,0) . s cnt=cnt+1 s tryary(cnt)="Other (specify)" "RTN","SAMINOT2",450,0) . s tryot=$$XVAL("siscos",vals) "RTN","SAMINOT2",451,0) ; "RTN","SAMINOT2",452,0) i cnt>0 d ; "RTN","SAMINOT2",453,0) . i ptried="" d OUT("Since your prior CT scan have you ever tried to quit smoking? ") "RTN","SAMINOT2",454,0) . n zi s zi="" "RTN","SAMINOT2",455,0) . f s zi=$o(tryary(zi)) q:zi="" d ; "RTN","SAMINOT2",456,0) . . d OUT(sp1_tryary(zi)) "RTN","SAMINOT2",457,0) . i tryot'="" d OUT(sp1_sp1_tryot) "RTN","SAMINOT2",458,0) ; "RTN","SAMINOT2",459,0) n cess,cess2 s cess="" s cess2="" "RTN","SAMINOT2",460,0) i $$XVAL("siscmd",vals)="d" s cess="Declined" "RTN","SAMINOT2",461,0) i $$XVAL("siscmd",vals)="a" s cess="Advised to quit smoking; VA resources provided" "RTN","SAMINOT2",462,0) i $$XVAL("siscmd",vals)="i" d ; "RTN","SAMINOT2",463,0) . s cess="Interested in VA tobacco cessation medication. Encouraged Veteran" "RTN","SAMINOT2",464,0) . s cess2="to talk to provider or pharmacist about which medication option is best for you." "RTN","SAMINOT2",465,0) i cess'="" d ; "RTN","SAMINOT2",466,0) . d OUT("Tobacco cessation provided:") "RTN","SAMINOT2",467,0) . d OUT(sp1_cess) "RTN","SAMINOT2",468,0) . i cess2'="" d OUT(sp1_cess2) "RTN","SAMINOT2",469,0) ; "RTN","SAMINOT2",470,0) quit ; end of SSTATUS "RTN","SAMINOT2",471,0) ; "RTN","SAMINOT2",472,0) ; "RTN","SAMINOT2",473,0) ; "RTN","SAMINOT2",474,0) LCSNOTE(vals,dest,cnt) ; lung cancer screening note "RTN","SAMINOT2",475,0) ; "RTN","SAMINOT2",476,0) ;ven/gpl;private;procedure; "RTN","SAMINOT2",477,0) ; "RTN","SAMINOT2",478,0) ; do OUT("") "RTN","SAMINOT2",479,0) ; "RTN","SAMINOT2",480,0) n sp1 s sp1=" " "RTN","SAMINOT2",481,0) d OUT("Initial LDCT/Baseline: "_$$XVAL("sidoe",vals)) "RTN","SAMINOT2",482,0) d OUT("Date of most recent CT/LDCT: "_$$XVAL("fulctdt",vals)) "RTN","SAMINOT2",483,0) d OUT(sp1_"Notification of Results: "_$$XVAL("sidof",vals)) "RTN","SAMINOT2",484,0) n addcmt s addcmt=$$XVAL("fucmctde",vals) "RTN","SAMINOT2",485,0) i addcmt'="" d ; "RTN","SAMINOT2",486,0) . d OUT("Additional comments:") "RTN","SAMINOT2",487,0) . d OUT(sp1_addcmt) "RTN","SAMINOT2",488,0) n impress s impress="" "RTN","SAMINOT2",489,0) n ctary "RTN","SAMINOT2",490,0) d CTINFO("ctary",sid,form) "RTN","SAMINOT2",491,0) s impress=$g(ctary("impression")) "RTN","SAMINOT2",492,0) ; get impression from lastest CT Eval here "RTN","SAMINOT2",493,0) d IMPRESS("ctary",sid) "RTN","SAMINOT2",494,0) ;i impress'="" d ; "RTN","SAMINOT2",495,0) ;. d OUT("Impression:") "RTN","SAMINOT2",496,0) ;. d OUT(sp1_impress) "RTN","SAMINOT2",497,0) ; smoking status follows "RTN","SAMINOT2",498,0) d SSTATUS(vals) "RTN","SAMINOT2",499,0) ;d OUT("Veteran was contacted via:") "RTN","SAMINOT2",500,0) ;n sp1 s sp1=" " "RTN","SAMINOT2",501,0) ;d:$$XVAL("fucmctip",vals) OUT(sp1_"In person") "RTN","SAMINOT2",502,0) ;d:$$XVAL("fucmctte",vals) OUT(sp1_"Telephone") "RTN","SAMINOT2",503,0) ;d:$$XVAL("fucmctth",vals) OUT(sp1_"TeleHealth") "RTN","SAMINOT2",504,0) ;d:$$XVAL("fucmctml",vals) OUT(sp1_"Mailed Letter") "RTN","SAMINOT2",505,0) ;d:$$XVAL("fucmctpp",vals) OUT(sp1_"Message in patient portal") "RTN","SAMINOT2",506,0) ;d:$$XVAL("fucmctvd",vals) OUT(sp1_"Video-on-demand (VOD)") "RTN","SAMINOT2",507,0) ;d:$$XVAL("fucmctot",vals) OUT(sp1_"Other: "_$$XVAL("fucmctoo",vals)) "RTN","SAMINOT2",508,0) ;d OUT("") "RTN","SAMINOT2",509,0) ; "RTN","SAMINOT2",510,0) ;d:$$XVAL("fucmctde",vals)'="" "RTN","SAMINOT2",511,0) ;. d OUT("Communication details:") "RTN","SAMINOT2",512,0) ;. d OUT(sp1_$$XVAL("fucmctde",vals)) "RTN","SAMINOT2",513,0) n recom s recom="" "RTN","SAMINOT2",514,0) ; get recommendations from CT eval form here "RTN","SAMINOT2",515,0) s recom=$g(ctary("followup")) "RTN","SAMINOT2",516,0) i recom'="" d ; "RTN","SAMINOT2",517,0) . d OUT("Recommendations:") "RTN","SAMINOT2",518,0) . d OUT(sp1_recom) "RTN","SAMINOT2",519,0) . i $g(ctary("followup2"))'="" d ; "RTN","SAMINOT2",520,0) . . d OUT(sp1_ctary("followup2")) "RTN","SAMINOT2",521,0) . i $g(ctary("followup3"))'="" d ; "RTN","SAMINOT2",522,0) . . d OUT(sp1_ctary("followup3")) "RTN","SAMINOT2",523,0) n ordered s ordered=$$XVAL("funewct",vals) "RTN","SAMINOT2",524,0) i ordered'="" d ; "RTN","SAMINOT2",525,0) . s ordered=$s(ordered="y":"Yes",ordered="n":"No",1:"") "RTN","SAMINOT2",526,0) . d OUT("CT/LDCT ordered: "_ordered) "RTN","SAMINOT2",527,0) n pulmon s pulmon=$$XVAL("fucompul",vals) "RTN","SAMINOT2",528,0) i pulmon'="" d ; "RTN","SAMINOT2",529,0) . s pulmon=$s(pulmon="y":"Yes",pulmon="n":"No",1:"") "RTN","SAMINOT2",530,0) . d OUT("Communicated to Pulmonary: "_pulmon) "RTN","SAMINOT2",531,0) ; "RTN","SAMINOT2",532,0) quit ; end of LCSNOTE "RTN","SAMINOT2",533,0) ; "RTN","SAMINOT2",534,0) ; "RTN","SAMINOT2",535,0) TOUT(sid) ; "RTN","SAMINOT2",536,0) s root=$$setroot^%wd("vapals-patients") "RTN","SAMINOT2",537,0) s groot=$na(@root@("graph",sid)) "RTN","SAMINOT2",538,0) s g="" "RTN","SAMINOT2",539,0) f s g=$o(@groot@(g)) q:g="" d ; "RTN","SAMINOT2",540,0) . w !,g "RTN","SAMINOT2",541,0) quit "RTN","SAMINOT2",542,0) ; "RTN","SAMINOT2",543,0) OUT(ln) ; output new line to note "RTN","SAMINOT2",544,0) ; "RTN","SAMINOT2",545,0) ;ven/gpl;private;procedure; "RTN","SAMINOT2",546,0) ; "RTN","SAMINOT2",547,0) i $$CRWRAP^SAMITTW(ln,dest,.cnt,80) q ; "RTN","SAMINOT2",548,0) ; "RTN","SAMINOT2",549,0) s cnt=cnt+1 "RTN","SAMINOT2",550,0) n lnn "RTN","SAMINOT2",551,0) ;s debug=1 "RTN","SAMINOT2",552,0) s lnn=$o(@dest@(" "),-1)+1 "RTN","SAMINOT2",553,0) s @dest@(lnn)=ln "RTN","SAMINOT2",554,0) ; "RTN","SAMINOT2",555,0) ;i $g(debug)=1 d ; "RTN","SAMINOT2",556,0) ;. i ln["<" q ; no markup "RTN","SAMINOT2",557,0) ;. n zs s zs=$STACK "RTN","SAMINOT2",558,0) ;. n zp s zp=$STACK(zs-2,"PLACE") "RTN","SAMINOT2",559,0) ;. s @dest@(lnn)=zp_":"_ln "RTN","SAMINOT2",560,0) ; "RTN","SAMINOT2",561,0) quit ; end of OUT "RTN","SAMINOT2",562,0) ; "RTN","SAMINOT2",563,0) ; "RTN","SAMINOT2",564,0) ; "RTN","SAMINOT2",565,0) XVAL(var,vals) ; value of form variable "RTN","SAMINOT2",566,0) ; "RTN","SAMINOT2",567,0) ;ven/gpl;private;function; "RTN","SAMINOT2",568,0) ;@input "RTN","SAMINOT2",569,0) ; var = name of form variable "RTN","SAMINOT2",570,0) ; vals = global root of form variable array "RTN","SAMINOT2",571,0) ; @vals = form variable array [pass by name] "RTN","SAMINOT2",572,0) ;@output = value of form variable "RTN","SAMINOT2",573,0) ; "RTN","SAMINOT2",574,0) new zr "RTN","SAMINOT2",575,0) set zr=$get(@vals@(var)) "RTN","SAMINOT2",576,0) ; "RTN","SAMINOT2",577,0) ; i zr="" s zr="["_var_"]" "RTN","SAMINOT2",578,0) ; "RTN","SAMINOT2",579,0) quit zr ; end of $$XVAL "RTN","SAMINOT2",580,0) ; "RTN","SAMINOT2",581,0) ; "RTN","SAMINOT2",582,0) ; "RTN","SAMINOT2",583,0) PREVCT(SID,FORM) ; key to previous ct eval form "RTN","SAMINOT2",584,0) ; "RTN","SAMINOT2",585,0) ;ven/gpl;private;function; "RTN","SAMINOT2",586,0) ;@input "RTN","SAMINOT2",587,0) ; FORM = [not yet implemented, always treated as if FORM=""] "RTN","SAMINOT2",588,0) ;@output = form key of CT Eval form previous to FORM "RTN","SAMINOT2",589,0) ; "RTN","SAMINOT2",590,0) ; $$PREVCT returns the form key to the CT Eval form previous to "RTN","SAMINOT2",591,0) ; FORM. If FORM is null, the latest CT Eval form key is returned. "RTN","SAMINOT2",592,0) ; "RTN","SAMINOT2",593,0) new gn set gn=$$setroot^%wd("vapals-patients") "RTN","SAMINOT2",594,0) new prev set prev=$order(@gn@("graph",SID,"ceform-30"),-1) "RTN","SAMINOT2",595,0) ; "RTN","SAMINOT2",596,0) quit prev ; end of $$PREVCT "RTN","SAMINOT2",597,0) ; "RTN","SAMINOT2",598,0) ; "RTN","SAMINOT2",599,0) ; "RTN","SAMINOT2",600,0) CTINFO(ARY,SID,FORM) ; extracts from latest CT Eval form "RTN","SAMINOT2",601,0) ; "RTN","SAMINOT2",602,0) ;ven/gpl;private;procedure; "RTN","SAMINOT2",603,0) ;@input "RTN","SAMINOT2",604,0) ; ARY = name of output array "RTN","SAMINOT2",605,0) ; SID "RTN","SAMINOT2",606,0) ; FORM "RTN","SAMINOT2",607,0) ;@output "RTN","SAMINOT2",608,0) ; @ARY = extract from latest ct eval form [passed by name] "RTN","SAMINOT2",609,0) ; "RTN","SAMINOT2",610,0) n ctkey s ctkey=$$PREVCT(SID,$G(FORM)) "RTN","SAMINOT2",611,0) q:ctkey="" "RTN","SAMINOT2",612,0) n root s root=$$setroot^%wd("vapals-patients") "RTN","SAMINOT2",613,0) n ctroot s ctroot=$na(@root@("graph",SID,ctkey)) "RTN","SAMINOT2",614,0) ; "RTN","SAMINOT2",615,0) s @ARY@("ctform")=ctkey "RTN","SAMINOT2",616,0) s @ARY@("impression")=$g(@ctroot@("ceimre")) "RTN","SAMINOT2",617,0) n futext "RTN","SAMINOT2",618,0) s futext=$g(@ctroot@("cefuw")) "RTN","SAMINOT2",619,0) n futbl "RTN","SAMINOT2",620,0) s futbl("1y")="Annual repeat" "RTN","SAMINOT2",621,0) s futbl("nw")="Now" "RTN","SAMINOT2",622,0) s futbl("1m")="1 month" "RTN","SAMINOT2",623,0) s futbl("3m")="3 months" "RTN","SAMINOT2",624,0) s futbl("6m")="6 months" "RTN","SAMINOT2",625,0) s futbl("os")="other" "RTN","SAMINOT2",626,0) i futext'="" s futext=$g(futbl(futext)) "RTN","SAMINOT2",627,0) n fudate s fudate=$g(@ctroot@("cefud")) "RTN","SAMINOT2",628,0) ; #Other followup "RTN","SAMINOT2",629,0) n zfu,ofu,tofu,comma "RTN","SAMINOT2",630,0) n vals s vals=ctroot "RTN","SAMINOT2",631,0) s comma=0,tofu="" "RTN","SAMINOT2",632,0) s ofu="" "RTN","SAMINOT2",633,0) f zfu="cefuaf","cefucc","cefupe","cefufn","cefubr","cefupc","cefutb" d ; "RTN","SAMINOT2",634,0) . i $$XVAL(zfu,vals)="y" s ofu=ofu_zfu "RTN","SAMINOT2",635,0) i $$XVAL("cefuo",vals)'="" s ofu=ofu_"cefuo" "RTN","SAMINOT2",636,0) i ofu'="" d ; "RTN","SAMINOT2",637,0) . s tofu="Other followup: " "RTN","SAMINOT2",638,0) . i ofu["cefuaf" s tofu=tofu_"Antibiotics" s comma=1 "RTN","SAMINOT2",639,0) . i ofu["cefucc" s tofu=tofu_$s(comma:", ",1:"")_"Diagnostic CT" s comma=1 "RTN","SAMINOT2",640,0) . i ofu["cefupe" s tofu=tofu_$s(comma:", ",1:"")_"PET" s comma=1 "RTN","SAMINOT2",641,0) . i ofu["cefufn" s tofu=tofu_$s(comma:", ",1:"")_"Percutaneous biopsy" s comma=1 "RTN","SAMINOT2",642,0) . i ofu["cefubr" s tofu=tofu_$s(comma:", ",1:"")_"Bronchoscopy" s comma=1 "RTN","SAMINOT2",643,0) . i ofu["cefupc" s tofu=tofu_$s(comma:", ",1:"")_"Pulmonary consultation" s comma=1 "RTN","SAMINOT2",644,0) . i ofu["cefutb" s tofu=tofu_$s(comma:", ",1:"")_"Refer to tumor board" s comma=1 "RTN","SAMINOT2",645,0) . i ofu["cefuo" s tofu=tofu_$s(comma:", ",1:"")_"Other:" s comma=1 "RTN","SAMINOT2",646,0) s @ARY@("followup")=futext_" "_fudate "RTN","SAMINOT2",647,0) s @ARY@("followup2")=tofu "RTN","SAMINOT2",648,0) s @ARY@("followup3")=$$XVAL("cefuoo",vals) "RTN","SAMINOT2",649,0) ; "RTN","SAMINOT2",650,0) quit ; end of CTINFO "RTN","SAMINOT2",651,0) ; "RTN","SAMINOT2",652,0) ; "RTN","SAMINOT2",653,0) ; "RTN","SAMINOT2",654,0) IMPRESS(ARY,SID) ; impressions from ct eval report "RTN","SAMINOT2",655,0) ; "RTN","SAMINOT2",656,0) ;ven/gpl;private;procedure; "RTN","SAMINOT2",657,0) ;@input "RTN","SAMINOT2",658,0) ; ARY = name of output array "RTN","SAMINOT2",659,0) ; SID "RTN","SAMINOT2",660,0) ;@output "RTN","SAMINOT2",661,0) ; @ARY = impressions from ct eval report [passed by name] "RTN","SAMINOT2",662,0) ; "RTN","SAMINOT2",663,0) n root s root=$$setroot^%wd("vapals-patients") "RTN","SAMINOT2",664,0) n ctkey s ctkey=$g(@ARY@("ctform")) "RTN","SAMINOT2",665,0) n vals s vals=$na(@root@("graph",SID,ctkey)) "RTN","SAMINOT2",666,0) n dict s dict=$$setroot^%wd("cteval-dict") "RTN","SAMINOT2",667,0) s dict=$na(@dict@("cteval-dict")) "RTN","SAMINOT2",668,0) n para s para="" "RTN","SAMINOT2",669,0) n sp1 s sp1=" " "RTN","SAMINOT2",670,0) ; "RTN","SAMINOT2",671,0) d OUT("Impression:") "RTN","SAMINOT2",672,0) d OUT(sp1_$$XSUB("ceimn",vals,dict)_para) "RTN","SAMINOT2",673,0) ; "RTN","SAMINOT2",674,0) ;# Report CAC Score and Extent of Emphysema "RTN","SAMINOT2",675,0) s cacval=0 "RTN","SAMINOT2",676,0) d ;if $$XVAL("ceccv",vals)'="e" d ; "RTN","SAMINOT2",677,0) . set vcac=$$XVAL("cecccac",vals) "RTN","SAMINOT2",678,0) . if vcac'="" d ; "RTN","SAMINOT2",679,0) . . s cacrec="" "RTN","SAMINOT2",680,0) . . s cac="The Visual Coronary Artery Calcium (CAC) Score is "_vcac_". " "RTN","SAMINOT2",681,0) . . s cacval=vcac "RTN","SAMINOT2",682,0) . . i cacval>3 s cacrec=$g(@dict@("CAC_recommendation"))_para "RTN","SAMINOT2",683,0) ; "RTN","SAMINOT2",684,0) i cacval>0 d ; "RTN","SAMINOT2",685,0) . d OUT(sp1_cac_" "_cacrec_" "_para) "RTN","SAMINOT2",686,0) . d ;if $$XVAL("ceemv",vals)="e" d ; "RTN","SAMINOT2",687,0) . . if $$XVAL("ceem",vals)'="no" d ; "RTN","SAMINOT2",688,0) . . . if $$XVAL("ceem",vals)="nv" q ; "RTN","SAMINOT2",689,0) . . . d OUT(sp1_"Emphysema: "_$$XSUB("ceem",vals,dict)_"."_para) "RTN","SAMINOT2",690,0) ; "RTN","SAMINOT2",691,0) i $$XVAL("ceclini",vals)="y" d ; "RTN","SAMINOT2",692,0) . d OUT(sp1_$$XVAL("ceclin",vals)_"."_para) "RTN","SAMINOT2",693,0) ; "RTN","SAMINOT2",694,0) i $$XVAL("ceoppai",vals)="y" d ; "RTN","SAMINOT2",695,0) . d OUT(sp1_$$XVAL("ceoppa",vals)_"."_para) "RTN","SAMINOT2",696,0) ; "RTN","SAMINOT2",697,0) i $$XVAL("ceoppabi",vals)="y" d ; "RTN","SAMINOT2",698,0) . d OUT(sp1_$$XVAL("ceoppab",vals)_"."_para) "RTN","SAMINOT2",699,0) ; "RTN","SAMINOT2",700,0) i $$XVAL("cecommcai",vals)="y" d ; "RTN","SAMINOT2",701,0) . d OUT(sp1_$$XVAL("cecommca",vals)_"."_para) "RTN","SAMINOT2",702,0) ; "RTN","SAMINOT2",703,0) i $$XVAL("ceotabnmi",vals)="y" d ; "RTN","SAMINOT2",704,0) . d OUT(sp1_$$XVAL("ceotabnm",vals)_"."_para) "RTN","SAMINOT2",705,0) ; "RTN","SAMINOT2",706,0) i $$XVAL("ceobrci",vals)="y" d ; "RTN","SAMINOT2",707,0) . d OUT(sp1_$$XVAL("ceobrc",vals)_"."_para) "RTN","SAMINOT2",708,0) ; "RTN","SAMINOT2",709,0) i $$XVAL("ceaoabbi",vals)="y" d ; "RTN","SAMINOT2",710,0) . d OUT(sp1_$$XVAL("ceaoabb",vals)_"."_para) "RTN","SAMINOT2",711,0) ; "RTN","SAMINOT2",712,0) i $$XVAL("ceaoabi",vals)="y" d ; "RTN","SAMINOT2",713,0) . d OUT(sp1_$$XVAL("ceaoab",vals)_"."_para) "RTN","SAMINOT2",714,0) ; "RTN","SAMINOT2",715,0) ;# Impression Remarks "RTN","SAMINOT2",716,0) i $$XVAL("ceimre",vals)'="" d ; "RTN","SAMINOT2",717,0) . d OUT(sp1_$$XVAL("ceimre",vals)_"."_para) "RTN","SAMINOT2",718,0) ; "RTN","SAMINOT2",719,0) quit ; end of IMPRESS "RTN","SAMINOT2",720,0) ; "RTN","SAMINOT2",721,0) ; "RTN","SAMINOT2",722,0) ; "RTN","SAMINOT2",723,0) XSUB(var,vals,dict,valdx) ; dictionary value for variable "RTN","SAMINOT2",724,0) ; "RTN","SAMINOT2",725,0) ;ven/gpl;private;function; "RTN","SAMINOT2",726,0) ;@input "RTN","SAMINOT2",727,0) ; var = name of dictionary value "RTN","SAMINOT2",728,0) ; vals = name of variables array "RTN","SAMINOT2",729,0) ; @vals = variables array [passed by name] "RTN","SAMINOT2",730,0) ; dict = name of dictionary array "RTN","SAMINOT2",731,0) ; @dict = dictionary array [passed by name] "RTN","SAMINOT2",732,0) ; valdx = used for nodules ala cect2co with nodule # included "RTN","SAMINOT2",733,0) ;@output = dictionary value for variable "RTN","SAMINOT2",734,0) ; "RTN","SAMINOT2",735,0) ; new dict set dict=$$setroot^%wd("cteval-dict") "RTN","SAMINOT2",736,0) ; "RTN","SAMINOT2",737,0) n zr,zv,zdx "RTN","SAMINOT2",738,0) s zdx=$g(valdx) "RTN","SAMINOT2",739,0) i zdx="" s zdx=var "RTN","SAMINOT2",740,0) s zv=$g(@vals@(zdx)) "RTN","SAMINOT2",741,0) ;i zv="" s zr="["_var_"]" q zr "RTN","SAMINOT2",742,0) i zv="" s zr="" q zr "RTN","SAMINOT2",743,0) s zr=$g(@dict@(var,zv)) "RTN","SAMINOT2",744,0) ;i zr="" s zr="["_var_","_zv_"]" "RTN","SAMINOT2",745,0) ; "RTN","SAMINOT2",746,0) quit zr ; end of $$XSUB "RTN","SAMINOT2",747,0) ; "RTN","SAMINOT2",748,0) ; "RTN","SAMINOT2",749,0) ; "RTN","SAMINOT2",750,0) EOR ; end of routine SAMINOT2 "RTN","SAMINUL") 0^13^B108214 "RTN","SAMINUL",1,0) SAMINUL ;ven/gpl - ielcap: note log ;2021-07-01t17:41z "RTN","SAMINUL",2,0) ;;18.0;SAMI;**9,10,11,12**;2020-01;Build 6 "RTN","SAMINUL",3,0) ;;1.18.0.11-t3+i11 "RTN","SAMINUL",4,0) ; "RTN","SAMINUL",5,0) ; SAMINOTE contains subroutines for producing the ELCAP Note Pages. "RTN","SAMINUL",6,0) ; SAMINUL contains the development log for the SAMINOT* routines. "RTN","SAMINUL",7,0) ; It contains no executable code. "RTN","SAMINUL",8,0) ; "RTN","SAMINUL",9,0) quit ; no entry from top "RTN","SAMINUL",10,0) ; "RTN","SAMINUL",11,0) ; "RTN","SAMINUL",12,0) ; "RTN","SAMINUL",13,0) ;@section 0 primary development "RTN","SAMINUL",14,0) ; "RTN","SAMINUL",15,0) ; "RTN","SAMINUL",16,0) ; "RTN","SAMINUL",17,0) ;@routine-credits "RTN","SAMINUL",18,0) ;@primary-dev George P. Lilly (gpl) "RTN","SAMINUL",19,0) ; gpl@vistaexpertise.net "RTN","SAMINUL",20,0) ;@primary-dev-org Vista Expertise Network (ven) "RTN","SAMINUL",21,0) ; http://vistaexpertise.net "RTN","SAMINUL",22,0) ;@copyright 2017/2021, gpl, all rights reserved "RTN","SAMINUL",23,0) ;@license see routine SAMIUL "RTN","SAMINUL",24,0) ; "RTN","SAMINUL",25,0) ;@last-updated 2021-07-01t17:41z "RTN","SAMINUL",26,0) ;@application Screening Applications Management (SAM) "RTN","SAMINUL",27,0) ;@module Screening Applications Management - IELCAP (SAMI) "RTN","SAMINUL",28,0) ;@suite-of-files SAMI Forms (311.101-311.199) "RTN","SAMINUL",29,0) ;@version 1.18.0.12-t3+i12 "RTN","SAMINUL",30,0) ;@release-date 2020-01 "RTN","SAMINUL",31,0) ;@patch-list **9,10,11,12** "RTN","SAMINUL",32,0) ; "RTN","SAMINUL",33,0) ;@additional-dev Frederick D. S. Marshall (toad) "RTN","SAMINUL",34,0) ; toad@vistaexpertise.net "RTN","SAMINUL",35,0) ;@additional-dev Larry G. Carlson (lgc) "RTN","SAMINUL",36,0) ; larry.g.carlson@gmail.com "RTN","SAMINUL",37,0) ;@additional-dev Linda M. R. Yaw (lmry) "RTN","SAMINUL",38,0) ; linda.yaw@vistaexpertise.net "RTN","SAMINUL",39,0) ;@additional-dev Alexis R. Carlson (arc) "RTN","SAMINUL",40,0) ; whatisthehumanspirit@gmail.com "RTN","SAMINUL",41,0) ;@additional-dev Domenic DiNatale (dom) "RTN","SAMINUL",42,0) ; domenic.dinatale@paraxialtech.com "RTN","SAMINUL",43,0) ;@additional-dev Kenneth McGlothlen (mcglk) "RTN","SAMINUL",44,0) ; mcglk@vistaexpertise.net "RTN","SAMINUL",45,0) ; "RTN","SAMINUL",46,0) ;@module-credits "RTN","SAMINUL",47,0) ;@project VA Partnership to Increase Access to Lung Screening "RTN","SAMINUL",48,0) ; (VA-PALS) "RTN","SAMINUL",49,0) ; http://va-pals.org/ "RTN","SAMINUL",50,0) ;@funding 2017/2021, Bristol-Myers Squibb Foundation (bmsf) "RTN","SAMINUL",51,0) ; https://www.bms.com/about-us/responsibility/bristol-myers-squibb-foundation.html "RTN","SAMINUL",52,0) ;@partner-org Veterans Affairs Office of Rural health "RTN","SAMINUL",53,0) ; https://www.ruralhealth.va.gov/ "RTN","SAMINUL",54,0) ;@partner-org International Early Lung Cancer Action Program (I-ELCAP) "RTN","SAMINUL",55,0) ; http://ielcap.com/ "RTN","SAMINUL",56,0) ;@partner-org Paraxial Technologies (par) "RTN","SAMINUL",57,0) ; http://paraxialtech.com/ "RTN","SAMINUL",58,0) ;@partner-org Open Source Electronic Health Record Alliance (OSEHRA) "RTN","SAMINUL",59,0) ; https://www.osehra.org/groups/va-pals-open-source-project-group "RTN","SAMINUL",60,0) ; "RTN","SAMINUL",61,0) ;@module-log repo github.com:VA-PALS-ELCAP/SAMI-VAPALS-ELCAP.git "RTN","SAMINUL",62,0) ; "RTN","SAMINUL",63,0) ; 2019-04-04/18 ven/gpl 1.18.0-t04 c0bb7dbf,f7b48936,9d1f2cdc, "RTN","SAMINUL",64,0) ; ba5f366d,5b2e32dc,ce322911 "RTN","SAMINUL",65,0) ; SAMINOT1: flags for intake form, fix crash on intake form, initial "RTN","SAMINUL",66,0) ; version of new intake notes, revise text for pre-enrollment "RTN","SAMINUL",67,0) ; discusstion note, complete new intake notes, add intake notes to "RTN","SAMINUL",68,0) ; case review page. "RTN","SAMINUL",69,0) ; "RTN","SAMINUL",70,0) ; 2019-04-16/23 ven/lgc 1.18.0-t04 e54b76d1,21388d8a,f0505e51, "RTN","SAMINUL",71,0) ; 89bffd3b "RTN","SAMINUL",72,0) ; SAMINOT1: SAMIFRM2 > SAMIFORM, remove spaces at end of lines, "RTN","SAMINUL",73,0) ; control characters, SAMISUB2 > LOAD. "RTN","SAMINUL",74,0) ; "RTN","SAMINUL",75,0) ; 2019-04-23 ven/toad 1.18.0-t04 423a3946 "RTN","SAMINUL",76,0) ; SAMINOT1: resolve gpl/lgc collision, restore SAMISUB2 > LOAD. "RTN","SAMINUL",77,0) ; "RTN","SAMINUL",78,0) ; 2019-04-30 ven/gpl 1.18.0-t04 cf73510c "RTN","SAMINUL",79,0) ; SAMINOT1: additions to intake note for prior scans & format. "RTN","SAMINUL",80,0) ; "RTN","SAMINUL",81,0) ; 2019-05-07 ven/lmry 1.18.0-t04 4a8ead45 "RTN","SAMINUL",82,0) ; SAMINOT1: edit SAMINOT1 for XINDEX. "RTN","SAMINUL",83,0) ; "RTN","SAMINUL",84,0) ; 2019-05-07 ven/lgc 1.18.0-t04 f63ef57c "RTN","SAMINUL",85,0) ; SAMINOT1: cleanup for XINDEX. "RTN","SAMINUL",86,0) ; "RTN","SAMINUL",87,0) ; 2019-06-18 ven/arc 1.18.0-t04 91022482 "RTN","SAMINUL",88,0) ; SAMINOT1: ^SAMIGPL > ^SAMIUL. "RTN","SAMINUL",89,0) ; "RTN","SAMINUL",90,0) ; 2019-07-01 ven/gpl 1.18.0-t04 72868e60 "RTN","SAMINUL",91,0) ; SAMINOT1: update shared decision making text in intake note. "RTN","SAMINUL",92,0) ; "RTN","SAMINUL",93,0) ; 2019-08-03/14 ven/gpl 1.18.0-t04 bea65f7b,578f61d4 "RTN","SAMINUL",94,0) ; SAMINOT1: fix bugs in Have you ever smoked processing in changelog "RTN","SAMINUL",95,0) ; & intake note, restored ever smoked comment field to intake note. "RTN","SAMINUL",96,0) ; "RTN","SAMINUL",97,0) ; 2019-09-06 par/dom 1.18.0-t04 2ff47189 VAP-452 "RTN","SAMINUL",98,0) ; SAMINOT1: patient > participant. "RTN","SAMINUL",99,0) ; "RTN","SAMINUL",100,0) ; 2019-09-26 ven/gpl 1.18.0-t04 92b12324 VAP-420 "RTN","SAMINUL",101,0) ; SAMINOT1: smoking history. "RTN","SAMINUL",102,0) ; "RTN","SAMINUL",103,0) ; 2019-10-01 par/dom 1.18.0-t04 37c418a1,4caf1a98 VAP-457,344 "RTN","SAMINUL",104,0) ; SAMINOT1: remove thorax, capitalization consistency. "RTN","SAMINUL",105,0) ; "RTN","SAMINUL",106,0) ; 2020-01-17/20 ven/lgc 1.18.0.1+i1 8557207f,d7d24834,0301ad95. "RTN","SAMINUL",107,0) ; 659f2526,0ff2b83f,49615242,5bf7c398,dc5f618c "RTN","SAMINUL",108,0) ; SAMINOT2: followup note, fixed typos in VC note, followup LCS note "RTN","SAMINUL",109,0) ; minus CT Eval pulls, LCS note with CT Eval extracts, fixed bug in "RTN","SAMINUL",110,0) ; LSC CT eval extract, include entire impression section of CT Eval "RTN","SAMINUL",111,0) ; report in LCS Note, improved import of impressions, limit to one "RTN","SAMINUL",112,0) ; note per followup form. "RTN","SAMINUL",113,0) ; "RTN","SAMINUL",114,0) ; 2020-01-23 ven/arc 1.18.0.2+i2 9a24242a "RTN","SAMINUL",115,0) ; SAMINOT1: fix word wrap on intake note & typos in ct "RTN","SAMINUL",116,0) ; eval report. "RTN","SAMINUL",117,0) ; "RTN","SAMINUL",118,0) ; 2020-08-12 ven/gpl 1.18.0.6+i6 781744c3 "RTN","SAMINUL",119,0) ; SAMINOT1: chg to support hl7 transmission of notes. "RTN","SAMINUL",120,0) ; "RTN","SAMINUL",121,0) ; 2020-09-22 ven/gpl 1.18.0.6+i6 06459eda "RTN","SAMINUL",122,0) ; SAMINOT1: fix to match kids file. "RTN","SAMINUL",123,0) ; "RTN","SAMINUL",124,0) ; 2021-02-01/24 ven/gpl 1.18.0.8+i8 8e4ec441,cde71a55 "RTN","SAMINUL",125,0) ; SAMINOT1: fix intake note format, fix error that sent note twice "RTN","SAMINUL",126,0) ; to VistA. "RTN","SAMINUL",127,0) ; "RTN","SAMINUL",128,0) ; 2021-03-02 ven/gpl 1.18.0.9+i9 479dc041 "RTN","SAMINUL",129,0) ; SAMINOT2: return error message if no ct eval form exists when "RTN","SAMINUL",130,0) ; generating a fu note. "RTN","SAMINUL",131,0) ; "RTN","SAMINUL",132,0) ; 2021-03-15/16 ven/toad 1.18.0.9+i9 a46a2cc1 "RTN","SAMINUL",133,0) ; SAMINUL: create routine. "RTN","SAMINUL",134,0) ; SAMINOT2: bump date & patch list, add contents, lt refactor. "RTN","SAMINUL",135,0) ; "RTN","SAMINUL",136,0) ; 2021-03-17 ven/toad 1.18.0.9+i9 62da30b4 "RTN","SAMINUL",137,0) ; SAMINOT2: remove blank from end of 1 line. "RTN","SAMINUL",138,0) ; "RTN","SAMINUL",139,0) ; 2021-03-22 ven/gpl 1.18.0.10+i10 6319a1eb "RTN","SAMINUL",140,0) ; SAMINOT1: fix logic bug in detecting pre-enrollment existing. "RTN","SAMINUL",141,0) ; "RTN","SAMINUL",142,0) ; 2021-03-23 ven/toad 1.18.0.10+i10 96f461d0 "RTN","SAMINUL",143,0) ; SAMINOT1: bump date & patch list, lt refactor. "RTN","SAMINUL",144,0) ; "RTN","SAMINUL",145,0) ; 2021-03-29 ven/gpl 1.18.0.11+i11 6cd83445 VAP-483 "RTN","SAMINUL",146,0) ; SAMINOT1: allow N/A for shared decision making on intake form: "RTN","SAMINUL",147,0) ; in INNOTE new & set shareddm & use to call SDM or report n/a, based "RTN","SAMINUL",148,0) ; on siidmdc. "RTN","SAMINUL",149,0) ; "RTN","SAMINUL",150,0) ; 2021-03-30/05-21 ven/mcglk&toad 1.18.0.11+i11 7b14bb2, "RTN","SAMINUL",151,0) ; SAMINOT1: bump version, date, log, add quit to stop block mismatch "RTN","SAMINUL",152,0) ; complaint from XINDEX. "RTN","SAMINUL",153,0) ; "RTN","SAMINUL",154,0) ; 2021-06-29 ven/gpl 1.18.0.12-t2+i12 a5bbd37a,d865b0dc "RTN","SAMINUL",155,0) ; SAMINOT1,2 text box formatting for intake & followup notes, new "RTN","SAMINUL",156,0) ; text processing utils; restrict follow forms to one generated note. "RTN","SAMINUL",157,0) ; "RTN","SAMINUL",158,0) ; 2021-07-01 ven/mcglk&toad 1.18.0.12-t2+i12 cbf7e46b "RTN","SAMINUL",159,0) ; SAMINOT1,2 bump dates & versions, update dev log, update contents. "RTN","SAMINUL",160,0) ; "RTN","SAMINUL",161,0) ; "RTN","SAMINUL",162,0) ; "RTN","SAMINUL",163,0) EOR ; end of routine SAMINUL "RTN","SAMIORM") 0^14^B175905084 "RTN","SAMIORM",1,0) SAMIORM ;ven/lgc&arc - HL7: ORM > patient-lookup ;2021-06-08t20:07z "RTN","SAMIORM",2,0) ;;18.0;SAMI;**11,12**;2020-01;Build 6 "RTN","SAMIORM",3,0) ;;1.18.0.12-t3+i12 "RTN","SAMIORM",4,0) ; "RTN","SAMIORM",5,0) ; SAMIORM parses an incoming Order (ORM) message into the fields "RTN","SAMIORM",6,0) ; array, then calls SAMIHL7 to use the array to update the patient- "RTN","SAMIORM",7,0) ; lookup graph. "RTN","SAMIORM",8,0) ; "RTN","SAMIORM",9,0) ; SAMIOUL contains the development log for the SAMIHL7 & SAMIOR* "RTN","SAMIORM",10,0) ; routines. "RTN","SAMIORM",11,0) ; "RTN","SAMIORM",12,0) quit ; no entry from top "RTN","SAMIORM",13,0) ; "RTN","SAMIORM",14,0) ; "RTN","SAMIORM",15,0) ; "RTN","SAMIORM",16,0) ;@section 0 primary development "RTN","SAMIORM",17,0) ; "RTN","SAMIORM",18,0) ; "RTN","SAMIORM",19,0) ; "RTN","SAMIORM",20,0) ;@routine-credits "RTN","SAMIORM",21,0) ;@primary-dev Larry G. Carlson (lgc) "RTN","SAMIORM",22,0) ; larry@fiscientific.com "RTN","SAMIORM",23,0) ;@primary-dev-org Vista Expertise Network (ven) "RTN","SAMIORM",24,0) ; http://vistaexpertise.net "RTN","SAMIORM",25,0) ;@copyright 2020/2021, lgc, all rights reserved "RTN","SAMIORM",26,0) ;@license see routine SAMIUL "RTN","SAMIORM",27,0) ; "RTN","SAMIORM",28,0) ;@last-updated 2021-06-08t20:07z "RTN","SAMIORM",29,0) ;@application Screening Applications Management (SAM) "RTN","SAMIORM",30,0) ;@module Screening Applications Management - IELCAP (SAMI) "RTN","SAMIORM",31,0) ;@submodule HL7 interface - SAMIHL* & SAMIOR* "RTN","SAMIORM",32,0) ;@suite-of-files SAMI Forms (311.101-311.199) "RTN","SAMIORM",33,0) ;@version 1.18.0.12-t3+i12 "RTN","SAMIORM",34,0) ;@release-date 2020-01 "RTN","SAMIORM",35,0) ;@patch-list **11,12** "RTN","SAMIORM",36,0) ; "RTN","SAMIORM",37,0) ;@additional-dev Alexis R. Carlson (arc) "RTN","SAMIORM",38,0) ; arc@vistaexpertise.net "RTN","SAMIORM",39,0) ;@additional-dev George P. Lilly (gpl) "RTN","SAMIORM",40,0) ; gpl@vistaexpertise.net "RTN","SAMIORM",41,0) ;@additional-dev Frederick D. S. Marshall (toad) "RTN","SAMIORM",42,0) ; toad@vistaexpertise.net "RTN","SAMIORM",43,0) ;@additional-dev Kenneth McGlothlen (mcglk) "RTN","SAMIORM",44,0) ; mcglk@vistaexpertise.net "RTN","SAMIORM",45,0) ; "RTN","SAMIORM",46,0) ;@routine-log repo github.com:VA-PALS-ELCAP/SAMI-VAPALS-ELCAP.git "RTN","SAMIORM",47,0) ; see routine SAMIOUL "RTN","SAMIORM",48,0) ;@contents "RTN","SAMIORM",49,0) ; EN-BLDARR-PMSG-UPDTPTL parse ORM msg > patient-lookup graph "RTN","SAMIORM",50,0) ; "RTN","SAMIORM",51,0) ; PARSEMSG get patient data f/ORM msg "RTN","SAMIORM",52,0) ; PID-ORMADDR get patient data from PID segment "RTN","SAMIORM",53,0) ; PV1 get patient data from PV1 segment "RTN","SAMIORM",54,0) ; ORC get patient data from ORC segment "RTN","SAMIORM",55,0) ; OBR get patient data from OBR segment "RTN","SAMIORM",56,0) ; "RTN","SAMIORM",57,0) ; TEST test hli EN^SAMIORM "RTN","SAMIORM",58,0) ; "RTN","SAMIORM",59,0) ; "RTN","SAMIORM",60,0) ; "RTN","SAMIORM",61,0) ;@section 1 hl7 applications & protocols that call hli EN^SAMIORM "RTN","SAMIORM",62,0) ; "RTN","SAMIORM",63,0) ; "RTN","SAMIORM",64,0) ; "RTN","SAMIORM",65,0) ; SAMI HL logical links "RTN","SAMIORM",66,0) ; "RTN","SAMIORM",67,0) ; NODE: LISTENER INSTITUTION: VISTA HEALTH CARE "RTN","SAMIORM",68,0) ; LLP TYPE: TCP DEVICE TYPE: Multi-threaded Server "RTN","SAMIORM",69,0) ; STATE: 7757 server AUTOSTART: Enabled "RTN","SAMIORM",70,0) ; MAILMAN DOMAIN: VAPALS.ELCAP.ORG SHUTDOWN LLP ?: NO "RTN","SAMIORM",71,0) ; QUEUE SIZE: 10 DO NOT PING: NO "RTN","SAMIORM",72,0) ; RE-TRANSMISSION ATTEMPTS: 5 READ TIMEOUT: 600 "RTN","SAMIORM",73,0) ; ACK TIMEOUT: 600 EXCEED RE-TRANSMIT ACTION: ignore "RTN","SAMIORM",74,0) ; TCP/IP PORT: 5000 TCP/IP SERVICE TYPE: MULTI LISTENER "RTN","SAMIORM",75,0) ; PERSISTENT: YES STARTUP NODE: USER:VAPALS "RTN","SAMIORM",76,0) ; IN QUEUE BACK POINTER: 117 IN QUEUE FRONT POINTER: 105 "RTN","SAMIORM",77,0) ; OUT QUEUE BACK POINTER: 76 OUT QUEUE FRONT POINTER: 76 "RTN","SAMIORM",78,0) ; "RTN","SAMIORM",79,0) ; "RTN","SAMIORM",80,0) ; "RTN","SAMIORM",81,0) ; SAMI HL7 applications "RTN","SAMIORM",82,0) ; "RTN","SAMIORM",83,0) ; NAME: MCAR-INST ACTIVE/INACTIVE: ACTIVE "RTN","SAMIORM",84,0) ; FACILITY NAME: VISTA COUNTRY CODE: USA "RTN","SAMIORM",85,0) ; HL7 ENCODING CHARACTERS: ^~\& HL7 FIELD SEPARATOR: | "RTN","SAMIORM",86,0) ; "RTN","SAMIORM",87,0) ; "RTN","SAMIORM",88,0) ; NAME: INST-MCAR ACTIVE/INACTIVE: ACTIVE "RTN","SAMIORM",89,0) ; FACILITY NAME: VAPALS COUNTRY CODE: USA "RTN","SAMIORM",90,0) ; HL7 ENCODING CHARACTERS: ^~\& HL7 FIELD SEPARATOR: | "RTN","SAMIORM",91,0) ; "RTN","SAMIORM",92,0) ; "RTN","SAMIORM",93,0) ; "RTN","SAMIORM",94,0) ; SAMI HL7 ORM protocols "RTN","SAMIORM",95,0) ; "RTN","SAMIORM",96,0) ; NAME: MCAR ORM SERVER "RTN","SAMIORM",97,0) ; ITEM TEXT: Clinical Procedures ORM Protocol Server "RTN","SAMIORM",98,0) ; TYPE: event driver CREATOR: LABTECH,FORTYEIGHT "RTN","SAMIORM",99,0) ; TIMESTAMP: 59921,33274 SENDING APPLICATION: MCAR-INST "RTN","SAMIORM",100,0) ; TRANSACTION MESSAGE TYPE: ORM EVENT TYPE: O01 "RTN","SAMIORM",101,0) ; VERSION ID: 2.3 "RTN","SAMIORM",102,0) ; SUBSCRIBERS: PHX ENROLL ORM "RTN","SAMIORM",103,0) ; "RTN","SAMIORM",104,0) ; "RTN","SAMIORM",105,0) ; NAME: PHX ENROLL ORM EVN TYPE: event driver "RTN","SAMIORM",106,0) ; CREATOR: CARLSON,LARRY G SENDING APPLICATION: MCAR-INST "RTN","SAMIORM",107,0) ; TRANSACTION MESSAGE TYPE: ORM EVENT TYPE: O01 "RTN","SAMIORM",108,0) ; ACCEPT ACK CODE: AL APPLICATION ACK TYPE: NE "RTN","SAMIORM",109,0) ; VERSION ID: 2.3 "RTN","SAMIORM",110,0) ; SUBSCRIBERS: PHX ENROLL ORM "RTN","SAMIORM",111,0) ; "RTN","SAMIORM",112,0) ; "RTN","SAMIORM",113,0) ; NAME: PHX ENROLL ORM TYPE: subscriber "RTN","SAMIORM",114,0) ; CREATOR: CARLSON,LARRY G RECEIVING APPLICATION: INST-MCAR "RTN","SAMIORM",115,0) ; EVENT TYPE: O01 RESPONSE MESSAGE TYPE: ACK "RTN","SAMIORM",116,0) ; PROCESSING ROUTINE: D EN^SAMIORM SENDING FACILITY REQUIRED?: YES "RTN","SAMIORM",117,0) ; "RTN","SAMIORM",118,0) ; RECEIVING FACILITY REQUIRED?: YES "RTN","SAMIORM",119,0) ; "RTN","SAMIORM",120,0) ; "RTN","SAMIORM",121,0) ; "RTN","SAMIORM",122,0) ;@section 2 main hli EN^SAMIORM "RTN","SAMIORM",123,0) ; "RTN","SAMIORM",124,0) ; "RTN","SAMIORM",125,0) ; "RTN","SAMIORM",126,0) ;@hli EN^SAMIORM "RTN","SAMIORM",127,0) EN ; parse ORM message into patient-lookup graph "RTN","SAMIORM",128,0) ; "RTN","SAMIORM",129,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIORM",130,0) ; "RTN","SAMIORM",131,0) ;;hli;procedure;clean;silent;sac "RTN","SAMIORM",132,0) ;@falls-thru-to "RTN","SAMIORM",133,0) ; BLDARR-PMSG-UPDTPTL "RTN","SAMIORM",134,0) ;@called-by [see section 1] "RTN","SAMIORM",135,0) ;@calls "RTN","SAMIORM",136,0) ; $$HTFM^XLFDT "RTN","SAMIORM",137,0) ; ACK^SAMIHL7 "RTN","SAMIORM",138,0) ;@input [tbd] "RTN","SAMIORM",139,0) ; ]HLNEXT = executable code that sets HLNODE to next line of hl7 msg "RTN","SAMIORM",140,0) ; ]HL("ECH") "RTN","SAMIORM",141,0) ; ]HL("FS") "RTN","SAMIORM",142,0) ; ]HLREC("MID") "RTN","SAMIORM",143,0) ;@output [tbd] "RTN","SAMIORM",144,0) ; patient-lookup graph updated for patient "RTN","SAMIORM",145,0) ; ^KBAP = debug array "RTN","SAMIORM",146,0) ; hl7 ACK msg sent "RTN","SAMIORM",147,0) ; "RTN","SAMIORM",148,0) ; "RTN","SAMIORM",149,0) ;@stanza 2 setup "RTN","SAMIORM",150,0) ; "RTN","SAMIORM",151,0) kill ^KBAP("SAMIORM") "RTN","SAMIORM",152,0) set ^KBAP("SAMIORM","EN")=$$HTFM^XLFDT($horolog)_" TEST" "RTN","SAMIORM",153,0) ; "RTN","SAMIORM",154,0) ; immediately return COMM ACK ***** TMP TURNED OFF "RTN","SAMIORM",155,0) do ACK^SAMIHL7 "RTN","SAMIORM",156,0) ; "RTN","SAMIORM",157,0) ; "RTN","SAMIORM",158,0) BLDARR ;@stanza 3 pull out message into samihl7 array "RTN","SAMIORM",159,0) ; "RTN","SAMIORM",160,0) ;@falls-thru-from "RTN","SAMIORM",161,0) ; EN "RTN","SAMIORM",162,0) ;@falls-thru-to "RTN","SAMIORM",163,0) ; PMSG-UPDTPTL "RTN","SAMIORM",164,0) ;@called-by none "RTN","SAMIORM",165,0) ;@calls "RTN","SAMIORM",166,0) ; $$HTFM^XLFDT "RTN","SAMIORM",167,0) ; "RTN","SAMIORM",168,0) new invdt set invdt=9999999.9999-$$HTFM^XLFDT($horolog) "RTN","SAMIORM",169,0) ; "RTN","SAMIORM",170,0) new HLARR ; hl7 msg array fetched by xecuting HLNEXT "RTN","SAMIORM",171,0) new samihl7 ; ditto "RTN","SAMIORM",172,0) new cnt set cnt=0 ; line count "RTN","SAMIORM",173,0) for do quit:$get(HLNODE)="" "RTN","SAMIORM",174,0) . xecute HLNEXT ; get next line of hl7 msg "RTN","SAMIORM",175,0) . quit:$get(HLNODE)="" ; done when out of lines "RTN","SAMIORM",176,0) . set cnt=cnt+1 ; count line "RTN","SAMIORM",177,0) . set HLARR(cnt)=HLNODE ; save line "RTN","SAMIORM",178,0) . set samihl7(cnt)=HLNODE ; ditto "RTN","SAMIORM",179,0) . quit "RTN","SAMIORM",180,0) ; "RTN","SAMIORM",181,0) kill ^KBAP("SAMIORM","BLDARR") "RTN","SAMIORM",182,0) merge ^KBAP("SAMIORM","BLDARR","HLARR")=HLARR "RTN","SAMIORM",183,0) ; "RTN","SAMIORM",184,0) new INFS set INFS=$get(HL("FS")) "RTN","SAMIORM",185,0) new INCC set INCC=$extract($get(HL("ECH"))) "RTN","SAMIORM",186,0) ; "RTN","SAMIORM",187,0) ; "RTN","SAMIORM",188,0) PMSG ;@stanza 4 pull patient data in ORM message > fields array "RTN","SAMIORM",189,0) ; "RTN","SAMIORM",190,0) ;@falls-thru-from "RTN","SAMIORM",191,0) ; EN-BLDARR "RTN","SAMIORM",192,0) ;@falls-thru-to "RTN","SAMIORM",193,0) ; UPDTPTL "RTN","SAMIORM",194,0) ;@called-by none "RTN","SAMIORM",195,0) ;@calls "RTN","SAMIORM",196,0) ; PARSEMSG "RTN","SAMIORM",197,0) ; "RTN","SAMIORM",198,0) new fields set fields("ORM",invdt,"msgid")=$get(HLREC("MID")) "RTN","SAMIORM",199,0) do PARSEMSG(.HLARR,.fields) ; get patient data f/ORM msg "RTN","SAMIORM",200,0) ; "RTN","SAMIORM",201,0) merge ^KBAP("SAMIORM","samihl7")=samihl7 "RTN","SAMIORM",202,0) merge ^KBAP("SAMIORM","fields")=fields "RTN","SAMIORM",203,0) ; "RTN","SAMIORM",204,0) ; "RTN","SAMIORM",205,0) UPDTPTL ;@stanza 5 update patient-lookup graph using fields array "RTN","SAMIORM",206,0) ; "RTN","SAMIORM",207,0) ;@falls-thru-from "RTN","SAMIORM",208,0) ; EN-BLDARR-PMSG "RTN","SAMIORM",209,0) ;@called-by none "RTN","SAMIORM",210,0) ;@calls "RTN","SAMIORM",211,0) ; UPDTPTL^SAMIHL7 "RTN","SAMIORM",212,0) ; $$setroot^%wd "RTN","SAMIORM",213,0) ; "RTN","SAMIORM",214,0) do UPDTPTL^SAMIHL7(.fields) ; update patient-lookup w/pat-flds array "RTN","SAMIORM",215,0) ; "RTN","SAMIORM",216,0) merge ^KBAP("SAMIORM","fields")=fields "RTN","SAMIORM",217,0) ; "RTN","SAMIORM",218,0) ; "RTN","SAMIORM",219,0) ;@stanza 6 file hl7 msg in patient-lookup graph "RTN","SAMIORM",220,0) ; "RTN","SAMIORM",221,0) ; At this point the fields have been filed in the patient with ptien "RTN","SAMIORM",222,0) ; into the patient lookup graph. I have the ptien in fields("ptien") "RTN","SAMIORM",223,0) ; and I have the HL7 message segments in samihl7. Time to file the "RTN","SAMIORM",224,0) ; actual hl7 message into patient lookup. "RTN","SAMIORM",225,0) ; NOTE: @rootpl@(ptien,"hl7 counter") was updated in UPDTPTL^SAMIHL7. "RTN","SAMIORM",226,0) ; "RTN","SAMIORM",227,0) new ptien set ptien=$get(fields("ptien")) "RTN","SAMIORM",228,0) quit:'ptien "RTN","SAMIORM",229,0) ; "RTN","SAMIORM",230,0) new rootpl set rootpl=$$setroot^%wd("patient-lookup") "RTN","SAMIORM",231,0) new hl7cnt set hl7cnt=$get(@rootpl@(ptien,"hl7 counter")) "RTN","SAMIORM",232,0) set fields("ORM",hl7cnt,"msgid")=$get(HLREC("MID")) "RTN","SAMIORM",233,0) ; "RTN","SAMIORM",234,0) new cnt set cnt=0 "RTN","SAMIORM",235,0) for set cnt=$order(samihl7(cnt)) quit:'cnt do "RTN","SAMIORM",236,0) . new seg set seg=$extract(samihl7(cnt),1,3) "RTN","SAMIORM",237,0) . set @rootpl@(ptien,"hl7",hl7cnt,seg)=samihl7(cnt) "RTN","SAMIORM",238,0) . quit "RTN","SAMIORM",239,0) ; "RTN","SAMIORM",240,0) ; "RTN","SAMIORM",241,0) ;@stanza 7 termination "RTN","SAMIORM",242,0) ; "RTN","SAMIORM",243,0) quit ; end of hli EN^SAMIORM "RTN","SAMIORM",244,0) ; "RTN","SAMIORM",245,0) ; "RTN","SAMIORM",246,0) ; "RTN","SAMIORM",247,0) ;@section 3 PARSEMSG subroutines "RTN","SAMIORM",248,0) ; "RTN","SAMIORM",249,0) ; "RTN","SAMIORM",250,0) ; "RTN","SAMIORM",251,0) PARSEMSG(HLARR,fields) ; get patient data f/ORM msg "RTN","SAMIORM",252,0) ; "RTN","SAMIORM",253,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIORM",254,0) ; "RTN","SAMIORM",255,0) ;;private;procedure;clean;silent;sac "RTN","SAMIORM",256,0) ;@called-by "RTN","SAMIORM",257,0) ; hli EN^SAMIORM "RTN","SAMIORM",258,0) ;@calls "RTN","SAMIORM",259,0) ; PID "RTN","SAMIORM",260,0) ; PV1 "RTN","SAMIORM",261,0) ; ORC "RTN","SAMIORM",262,0) ; OBR "RTN","SAMIORM",263,0) ;@input [tbd] "RTN","SAMIORM",264,0) ; .HLARR = hl7 msg array "RTN","SAMIORM",265,0) ; ]INFS = field separator "RTN","SAMIORM",266,0) ; ]INCC = subfield separator "RTN","SAMIORM",267,0) ; ]HL("FS") = field separator "RTN","SAMIORM",268,0) ;@output [tbd] "RTN","SAMIORM",269,0) ; .fields = fields array "RTN","SAMIORM",270,0) ; ^KBAP = debug array "RTN","SAMIORM",271,0) ; "RTN","SAMIORM",272,0) ; "RTN","SAMIORM",273,0) ;@stanza 2 get patient data "RTN","SAMIORM",274,0) ; "RTN","SAMIORM",275,0) set ^KBAP("SAMIORM","PARSEMSG","INFS")=$get(INFS) "RTN","SAMIORM",276,0) set ^KBAP("SAMIORM","PARSEMSG","INCC")=$get(INCC) "RTN","SAMIORM",277,0) ; "RTN","SAMIORM",278,0) ; get patient data from ORM message "RTN","SAMIORM",279,0) new cnt set cnt=0 "RTN","SAMIORM",280,0) for do quit:'cnt "RTN","SAMIORM",281,0) . set cnt=$order(HLARR(cnt)) "RTN","SAMIORM",282,0) . quit:'cnt "RTN","SAMIORM",283,0) . ; "RTN","SAMIORM",284,0) . new segment set segment=HLARR(cnt) "RTN","SAMIORM",285,0) . new SEG set SEG=$piece(HLARR(cnt),HL("FS")) "RTN","SAMIORM",286,0) . if SEG="PID" do PID(segment,.fields) "RTN","SAMIORM",287,0) . if SEG="PV1" do PV1(segment,.fields) "RTN","SAMIORM",288,0) . if SEG="ORC" do ORC(segment,.fields) "RTN","SAMIORM",289,0) . if SEG="OBR" do OBR(segment,.fields) "RTN","SAMIORM",290,0) . quit "RTN","SAMIORM",291,0) ; "RTN","SAMIORM",292,0) merge ^KBAP("SAMIORM","fields")=fields "RTN","SAMIORM",293,0) ; "RTN","SAMIORM",294,0) ; "RTN","SAMIORM",295,0) ;@stanza 3 termination "RTN","SAMIORM",296,0) ; "RTN","SAMIORM",297,0) quit ; end of PARSEMSG "RTN","SAMIORM",298,0) ; "RTN","SAMIORM",299,0) ; "RTN","SAMIORM",300,0) ; "RTN","SAMIORM",301,0) PID(segment,fields) ; get patient data from PID segment "RTN","SAMIORM",302,0) ; "RTN","SAMIORM",303,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIORM",304,0) ; "RTN","SAMIORM",305,0) ;;private;procedure;clean;silent;sac "RTN","SAMIORM",306,0) ;@falls-thru-to "RTN","SAMIORM",307,0) ; ORMADDR "RTN","SAMIORM",308,0) ;@called-by "RTN","SAMIORM",309,0) ; PARSEMSG "RTN","SAMIORM",310,0) ;@calls "RTN","SAMIORM",311,0) ; $$UP^XLFSTR "RTN","SAMIORM",312,0) ;@input "RTN","SAMIORM",313,0) ; .segment = PID segment of hl7 message "RTN","SAMIORM",314,0) ; ]INFS = field separator "RTN","SAMIORM",315,0) ; ]INCC = subfield separator "RTN","SAMIORM",316,0) ;@output "RTN","SAMIORM",317,0) ; .fields = fields array "RTN","SAMIORM",318,0) ; ^KBAP = debug array "RTN","SAMIORM",319,0) ; "RTN","SAMIORM",320,0) ; "RTN","SAMIORM",321,0) ;@stanza 2 get patient id #s "RTN","SAMIORM",322,0) ; "RTN","SAMIORM",323,0) set ^KBAP("SAMIORM","fields","PID","segment")=segment "RTN","SAMIORM",324,0) ; "RTN","SAMIORM",325,0) set fields("icn")="" ; not currently using integration control # "RTN","SAMIORM",326,0) set fields("ssn")=$piece($piece(segment,INFS,4),INCC) "RTN","SAMIORM",327,0) ; "RTN","SAMIORM",328,0) ; "RTN","SAMIORM",329,0) ;@stanza 3 get patient name "RTN","SAMIORM",330,0) ; "RTN","SAMIORM",331,0) new name set name=$$UP^XLFSTR($piece(segment,INFS,6)) ; full upper "RTN","SAMIORM",332,0) new lname set lname=$piece(name,INCC) ; last "RTN","SAMIORM",333,0) new fname set fname=$piece(name,INCC,2) ; first "RTN","SAMIORM",334,0) ; "RTN","SAMIORM",335,0) new mname set mname="" ; middle "RTN","SAMIORM",336,0) if $length(name,INCC)>2 set mname=$piece(name,INCC,3) "RTN","SAMIORM",337,0) ; "RTN","SAMIORM",338,0) new suffix set suffix="" ; suffix, e.g., JR, 3RD, etc. "RTN","SAMIORM",339,0) if $length(name,INCC)>3 set suffix=$piece(name,INCC,4) "RTN","SAMIORM",340,0) ; "RTN","SAMIORM",341,0) if $length(mname) set fname=fname_" "_mname "RTN","SAMIORM",342,0) if $length(suffix) set lname=lname_" "_suffix "RTN","SAMIORM",343,0) set name=lname_","_fname ; replace full "RTN","SAMIORM",344,0) ; "RTN","SAMIORM",345,0) set fields("saminame")=name "RTN","SAMIORM",346,0) set fields("sinamef")=fname "RTN","SAMIORM",347,0) set fields("sinamel")=lname "RTN","SAMIORM",348,0) ; "RTN","SAMIORM",349,0) ; "RTN","SAMIORM",350,0) ;@stanza 4 get other patient demographics "RTN","SAMIORM",351,0) ; "RTN","SAMIORM",352,0) if $length(fields("ssn")),$length(fields("saminame")) do "RTN","SAMIORM",353,0) . set fields("last5")=$extract(fields("saminame"))_$extract(fields("ssn"),6,9) "RTN","SAMIORM",354,0) . set ^KBAP("SAMIORM","MadeLast5")=$get(fields("last5")) "RTN","SAMIORM",355,0) . quit "RTN","SAMIORM",356,0) ; "RTN","SAMIORM",357,0) set fields("sbdob")=$piece(segment,INFS,8) "RTN","SAMIORM",358,0) set fields("sex")=$piece(segment,INFS,9) "RTN","SAMIORM",359,0) ; "RTN","SAMIORM",360,0) ; "RTN","SAMIORM",361,0) ORMADDR ;@stanza 5 get address "RTN","SAMIORM",362,0) ; "RTN","SAMIORM",363,0) ;@falls-thru-from "RTN","SAMIORM",364,0) ; PID "RTN","SAMIORM",365,0) ;@called-by none "RTN","SAMIORM",366,0) ;@calls none "RTN","SAMIORM",367,0) ; "RTN","SAMIORM",368,0) set fields("ORM",invdt,"fulladdress")=$piece(segment,INFS,12) "RTN","SAMIORM",369,0) ; "RTN","SAMIORM",370,0) set fields("address1")=$piece($piece(segment,INFS,12),INCC) "RTN","SAMIORM",371,0) set fields("city")=$piece($piece(segment,INFS,12),INCC,3) "RTN","SAMIORM",372,0) set fields("state")=$piece($piece(segment,INFS,12),INCC,4) "RTN","SAMIORM",373,0) set fields("zip")=$piece($piece(segment,INFS,12),INCC,5) "RTN","SAMIORM",374,0) set fields("phone")=$piece(segment,INFS,14) "RTN","SAMIORM",375,0) ; set fields("ssn")=$piece(segment,INFS,20) "RTN","SAMIORM",376,0) ; "RTN","SAMIORM",377,0) ; "RTN","SAMIORM",378,0) ;@stanza 6 termination "RTN","SAMIORM",379,0) ; "RTN","SAMIORM",380,0) quit ; end of PID-ORMADDR "RTN","SAMIORM",381,0) ; "RTN","SAMIORM",382,0) ; "RTN","SAMIORM",383,0) ; "RTN","SAMIORM",384,0) PV1(segment,fields) ; get patient data from PV1 segment "RTN","SAMIORM",385,0) ; "RTN","SAMIORM",386,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIORM",387,0) ; "RTN","SAMIORM",388,0) ;;private;procedure;clean;silent;sac "RTN","SAMIORM",389,0) ;@called-by "RTN","SAMIORM",390,0) ; PARSEMSG "RTN","SAMIORM",391,0) ;@calls none "RTN","SAMIORM",392,0) ;@input [tbd] "RTN","SAMIORM",393,0) ; .segment = PV1 segment of hl7 message "RTN","SAMIORM",394,0) ; ]INFS = field separator "RTN","SAMIORM",395,0) ; ]INCC = subfield separator "RTN","SAMIORM",396,0) ;@output [tbd] "RTN","SAMIORM",397,0) ; .fields = fields array "RTN","SAMIORM",398,0) ; ^KBAP = debug array "RTN","SAMIORM",399,0) ; "RTN","SAMIORM",400,0) ; "RTN","SAMIORM",401,0) ;@stanza 2 get patient data "RTN","SAMIORM",402,0) ; "RTN","SAMIORM",403,0) set ^KBAP("SAMIORM","fields","PIV","segment")=segment "RTN","SAMIORM",404,0) ; "RTN","SAMIORM",405,0) set fields("ORM",invdt,"patientclass")=$piece(segment,INFS,3) "RTN","SAMIORM",406,0) set fields("ORM",invdt,"assignedlocation")=$piece(segment,INFS,4) "RTN","SAMIORM",407,0) set fields("ORM",invdt,"providerien")=$piece($piece(segment,INFS,9),INCC) "RTN","SAMIORM",408,0) set fields("ORM",invdt,"providernm")=$translate($piece($piece(segment,INFS,9),INCC,2,4),"^",",") "RTN","SAMIORM",409,0) ; "RTN","SAMIORM",410,0) ; "RTN","SAMIORM",411,0) ;@stanza 3 termination "RTN","SAMIORM",412,0) ; "RTN","SAMIORM",413,0) quit ; end of PV1 "RTN","SAMIORM",414,0) ; "RTN","SAMIORM",415,0) ; "RTN","SAMIORM",416,0) ; "RTN","SAMIORM",417,0) ORC(segment,fields) ; get patient data from ORC segment "RTN","SAMIORM",418,0) ; "RTN","SAMIORM",419,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIORM",420,0) ; "RTN","SAMIORM",421,0) ;;private;procedure;clean;silent;sac "RTN","SAMIORM",422,0) ;@called-by "RTN","SAMIORM",423,0) ; PARSEMSG "RTN","SAMIORM",424,0) ;@calls none "RTN","SAMIORM",425,0) ;@input [tbd] "RTN","SAMIORM",426,0) ; .segment = ORC segment of hl7 message "RTN","SAMIORM",427,0) ; ]INFS = field separator "RTN","SAMIORM",428,0) ;@output [tbd] "RTN","SAMIORM",429,0) ; .fields = fields array "RTN","SAMIORM",430,0) ; ^KBAP = debug array "RTN","SAMIORM",431,0) ; "RTN","SAMIORM",432,0) ; "RTN","SAMIORM",433,0) ;@stanza 2 get patient data "RTN","SAMIORM",434,0) ; "RTN","SAMIORM",435,0) set ^KBAP("SAMIORM","fields","ORC","segment")=segment "RTN","SAMIORM",436,0) ; "RTN","SAMIORM",437,0) set fields("ORM",invdt,"ordercontrol")=$piece(segment,INFS,2) "RTN","SAMIORM",438,0) set fields("ORM",invdt,"ordernumber")=$piece(segment,INFS,3) "RTN","SAMIORM",439,0) set fields("ORM",invdt,"orderstatus")=$piece(segment,INFS,6) "RTN","SAMIORM",440,0) set fields("ORM",invdt,"transactiondt")=$piece(segment,INFS,10) "RTN","SAMIORM",441,0) set fields("ORM",invdt,"ordereffectivedt")=$piece(segment,INFS,16) "RTN","SAMIORM",442,0) ; "RTN","SAMIORM",443,0) ; "RTN","SAMIORM",444,0) ;@stanza 3 termination "RTN","SAMIORM",445,0) ; "RTN","SAMIORM",446,0) quit ; end of ORC "RTN","SAMIORM",447,0) ; "RTN","SAMIORM",448,0) ; "RTN","SAMIORM",449,0) ; "RTN","SAMIORM",450,0) OBR(segment,fields) ; get patient data from OBR segment "RTN","SAMIORM",451,0) ; "RTN","SAMIORM",452,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIORM",453,0) ; "RTN","SAMIORM",454,0) ;;private;procedure;clean;silent;sac "RTN","SAMIORM",455,0) ;@called-by "RTN","SAMIORM",456,0) ; PARSEMSG "RTN","SAMIORM",457,0) ;@calls none "RTN","SAMIORM",458,0) ;@input [tbd] "RTN","SAMIORM",459,0) ; .segment = OBR segment of hl7 message "RTN","SAMIORM",460,0) ; ]INFS = field separator "RTN","SAMIORM",461,0) ; ]INCC = subfield separator "RTN","SAMIORM",462,0) ;@output [tbd] "RTN","SAMIORM",463,0) ; .fields = fields array "RTN","SAMIORM",464,0) ; ^KBAP = debug array "RTN","SAMIORM",465,0) ; "RTN","SAMIORM",466,0) ; "RTN","SAMIORM",467,0) ;@stanza 2 get patient data "RTN","SAMIORM",468,0) ; "RTN","SAMIORM",469,0) set ^KBAP("SAMIORM","fields","OBR","segment")=segment "RTN","SAMIORM",470,0) ; "RTN","SAMIORM",471,0) set fields("ORM",invdt,"order")=$piece($piece(segment,INFS,5),INCC) "RTN","SAMIORM",472,0) ; "RTN","SAMIORM",473,0) set fields("ORM",invdt,"siteid")=$piece($piece($piece(segment,INFS,5),INCC),"_") "RTN","SAMIORM",474,0) set fields("siteid")=$piece($piece($piece(segment,INFS,5),INCC),"_") "RTN","SAMIORM",475,0) ; "RTN","SAMIORM",476,0) set fields("ORM",invdt,"order2")=$piece($piece(segment,INFS,5),INCC,2) "RTN","SAMIORM",477,0) ; "RTN","SAMIORM",478,0) ; "RTN","SAMIORM",479,0) ;@stanza 3 termination "RTN","SAMIORM",480,0) ; "RTN","SAMIORM",481,0) quit ; end of OBR "RTN","SAMIORM",482,0) ; "RTN","SAMIORM",483,0) ; "RTN","SAMIORM",484,0) ; "RTN","SAMIORM",485,0) CAMELCAS(str) ; convert string to camel case "RTN","SAMIORM",486,0) ; "RTN","SAMIORM",487,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIORM",488,0) ; "RTN","SAMIORM",489,0) ;;private;function;clean;silent;sac "RTN","SAMIORM",490,0) ;@called-by "RTN","SAMIORM",491,0) ; PID "RTN","SAMIORM",492,0) ;@calls "RTN","SAMIORM",493,0) ; $$LOW^XLFSTR "RTN","SAMIORM",494,0) ; $$UP^XLFSTR "RTN","SAMIORM",495,0) ;@input [tbd] "RTN","SAMIORM",496,0) ; str = string to convert "RTN","SAMIORM",497,0) ;@output = string in camel case "RTN","SAMIORM",498,0) ; "RTN","SAMIORM",499,0) ; "RTN","SAMIORM",500,0) ;@stanza 2 convert string "RTN","SAMIORM",501,0) ; "RTN","SAMIORM",502,0) if $get(str)="" quit str "RTN","SAMIORM",503,0) set str=$$LOW^XLFSTR(str) "RTN","SAMIORM",504,0) set str=$$UP^XLFSTR($extract(str,1))_$extract(str,2,$length(str)) "RTN","SAMIORM",505,0) ; "RTN","SAMIORM",506,0) ; "RTN","SAMIORM",507,0) ;@stanza 3 termination "RTN","SAMIORM",508,0) ; "RTN","SAMIORM",509,0) quit str ; end of $$CAMELCAS "RTN","SAMIORM",510,0) ; "RTN","SAMIORM",511,0) ; "RTN","SAMIORM",512,0) ; "RTN","SAMIORM",513,0) ;@section 4 test subroutine "RTN","SAMIORM",514,0) ; "RTN","SAMIORM",515,0) ; "RTN","SAMIORM",516,0) ; "RTN","SAMIORM",517,0) TEST ; test hli EN^SAMIORM "RTN","SAMIORM",518,0) ; "RTN","SAMIORM",519,0) ;@stanza 1 invocation, binding, & branching "RTN","SAMIORM",520,0) ; "RTN","SAMIORM",521,0) ;;dmi-test;procedure;clean;silent;sac "RTN","SAMIORM",522,0) ;@called-by "RTN","SAMIORM",523,0) ; PID "RTN","SAMIORM",524,0) ;@calls "RTN","SAMIORM",525,0) ; $$LOW^XLFSTR "RTN","SAMIORM",526,0) ; $$UP^XLFSTR "RTN","SAMIORM",527,0) ;@input [tbd] "RTN","SAMIORM",528,0) ; str = string to convert "RTN","SAMIORM",529,0) ;@output = string in camel case "RTN","SAMIORM",530,0) ; "RTN","SAMIORM",531,0) ; "RTN","SAMIORM",532,0) ;@stanza 2 convert string "RTN","SAMIORM",533,0) ; "RTN","SAMIORM",534,0) kill HLARR ; hl7 test orm msg "RTN","SAMIORM",535,0) set HLARR(1)="MSH|^~\&|MCAR-INST|VISTA|INST-MCAR|VAPALS|20200616135751-0700||ORM^O01|6442288610689|P|2.3|||||USA" "RTN","SAMIORM",536,0) set HLARR(2)="PID|1||000002341||ZZTEST^MACHO^^^^^L||19271106000000|M|||7726 W ORCHID ST^^PHOENIX^AZ^85017||||||||000002341|" "RTN","SAMIORM",537,0) set HLARR(3)="PV1||O|PHX-PULM RN LSS PHONE|||||244088^GARCIA^DANIEL^P" "RTN","SAMIORM",538,0) set HLARR(4)="ORC|NW|3200616135751|||NW||||20200616135751||||||20200616135751" "RTN","SAMIORM",539,0) set HLARR(5)="OBR||||PHO_LUNG^LUNG|" "RTN","SAMIORM",540,0) ; "RTN","SAMIORM",541,0) do HLENV^SAMIORU("MCAR ORM SERVER") ; set hl7 variables for testing "RTN","SAMIORM",542,0) ; "RTN","SAMIORM",543,0) set HLNEXT="D HLNEXT^HLCSUTL" ; get-next-line qwik "RTN","SAMIORM",544,0) set HLQUIT=0 ; curent ien of "IN" wp field in msg array in file 771 "RTN","SAMIORM",545,0) ; "RTN","SAMIORM",546,0) do EN ; parse ORM msg > patient-lookup graph "RTN","SAMIORM",547,0) ; "RTN","SAMIORM",548,0) ; "RTN","SAMIORM",549,0) ;@stanza 3 termination "RTN","SAMIORM",550,0) ; "RTN","SAMIORM",551,0) quit ; end of TEST "RTN","SAMIORM",552,0) ; "RTN","SAMIORM",553,0) ; "RTN","SAMIORM",554,0) ; "RTN","SAMIORM",555,0) EOR ; end of routine SAMIORM "RTN","SAMIOUL") 0^15^B103895 "RTN","SAMIOUL",1,0) SAMIOUL ;ven/toad - HL7 development log ;2021-06-08t19:27z "RTN","SAMIOUL",2,0) ;;18.0;SAMI;**12**;2020-01;Build 6 "RTN","SAMIOUL",3,0) ;;1.18.0.12-t3+i12 "RTN","SAMIOUL",4,0) ; "RTN","SAMIOUL",5,0) ; SAMIOUL is the development log for the SAMIHL7 & SAMIOR* routines, "RTN","SAMIOUL",6,0) ; which support VAPALS-ELCAP HL7 processing. "RTN","SAMIOUL",7,0) ; "RTN","SAMIOUL",8,0) quit ; no entry from top "RTN","SAMIOUL",9,0) ; "RTN","SAMIOUL",10,0) ; "RTN","SAMIOUL",11,0) ; "RTN","SAMIOUL",12,0) ;@section 0 primary development "RTN","SAMIOUL",13,0) ; "RTN","SAMIOUL",14,0) ; "RTN","SAMIOUL",15,0) ; "RTN","SAMIOUL",16,0) ;@routine-credits "RTN","SAMIOUL",17,0) ;@primary-dev Larry G. Carlson (lgc) "RTN","SAMIOUL",18,0) ; lgc@vistaexpertise.net "RTN","SAMIOUL",19,0) ;@primary-dev-org Vista Expertise Network (ven) "RTN","SAMIOUL",20,0) ; http://vistaexpertise.net "RTN","SAMIOUL",21,0) ;@copyright 2017/2021, lgc, all rights reserved "RTN","SAMIOUL",22,0) ;@license see routine SAMIUL "RTN","SAMIOUL",23,0) ; "RTN","SAMIOUL",24,0) ;@last-updated 2021-06-08t19:27z "RTN","SAMIOUL",25,0) ;@application Screening Applications Management (SAM) "RTN","SAMIOUL",26,0) ;@module Screening Applications Management - IELCAP (SAMI) "RTN","SAMIOUL",27,0) ;@suite-of-files SAMI Forms (311.101-311.199) "RTN","SAMIOUL",28,0) ;@version 1.18.0.12-t3+i12 "RTN","SAMIOUL",29,0) ;@release-date 2020-01 "RTN","SAMIOUL",30,0) ;@patch-list **12** "RTN","SAMIOUL",31,0) ; "RTN","SAMIOUL",32,0) ;@additional-dev Alexis R. Carlson (arc) "RTN","SAMIOUL",33,0) ; arc@vistaexpertise.net "RTN","SAMIOUL",34,0) ;@additional-dev George P. Lilly (gpl) "RTN","SAMIOUL",35,0) ; gpl@vistaexpertise.net "RTN","SAMIOUL",36,0) ;@additional-dev Frederick D. S. Marshall (toad) "RTN","SAMIOUL",37,0) ; toad@vistaexpertise.net "RTN","SAMIOUL",38,0) ;@additional-dev Kenneth McGlothlen (mcglk) "RTN","SAMIOUL",39,0) ; mcglk@vistaexpertise.net "RTN","SAMIOUL",40,0) ; "RTN","SAMIOUL",41,0) ;@module-credits "RTN","SAMIOUL",42,0) ;@project VA Partnership to Increase Access to Lung Screening "RTN","SAMIOUL",43,0) ; (VA-PALS) "RTN","SAMIOUL",44,0) ; http://va-pals.org/ "RTN","SAMIOUL",45,0) ;@funding 2017/2021, Bristol-Myers Squibb Foundation (bmsf) "RTN","SAMIOUL",46,0) ; https://www.bms.com/about-us/responsibility/bristol-myers-squibb-foundation.html "RTN","SAMIOUL",47,0) ;@partner-org Veterans Affairs Office of Rural health "RTN","SAMIOUL",48,0) ; https://www.ruralhealth.va.gov/ "RTN","SAMIOUL",49,0) ;@partner-org International Early Lung Cancer Action Program (I-ELCAP) "RTN","SAMIOUL",50,0) ; http://ielcap.com/ "RTN","SAMIOUL",51,0) ;@partner-org Paraxial Technologies (par) "RTN","SAMIOUL",52,0) ; http://paraxialtech.com/ "RTN","SAMIOUL",53,0) ;@partner-org Open Source Electronic Health Record Alliance (OSEHRA) "RTN","SAMIOUL",54,0) ; https://www.osehra.org/groups/va-pals-open-source-project-group "RTN","SAMIOUL",55,0) ; "RTN","SAMIOUL",56,0) ;@module-log repo github.com:VA-PALS-ELCAP/SAMI-VAPALS-ELCAP.git "RTN","SAMIOUL",57,0) ; "RTN","SAMIOUL",58,0) ; 2019-10-03/28 ven/lgc 1.18.0 d01fd10,ff6cea0,3670fb3,613e8ff "RTN","SAMIOUL",59,0) ; ,82979cc "RTN","SAMIOUL",60,0) ; SAMIHL7: HL7 routines to populate & update patient-lookup graph, "RTN","SAMIOUL",61,0) ; reorganize HL7 routines & work on unit tests, change how gender is "RTN","SAMIOUL",62,0) ; handled, update unit test routines for dfn 1, further updates to "RTN","SAMIOUL",63,0) ; SAMI unit tests. "RTN","SAMIOUL",64,0) ; "RTN","SAMIOUL",65,0) ; 2020-01-15 ven/lgc 1.18.0 0a2af96 "RTN","SAMIOUL",66,0) ; SAMIHL7: bulk commit due to switch to cache, major overhaul: "RTN","SAMIOUL",67,0) ; update capture of array structure; in UPDTPTL add UPDTPTL1,MATCHLOG "RTN","SAMIOUL",68,0) ; & update indices; r/root w/rootpl; annotate; cut DELPTL & 2 lines, "RTN","SAMIOUL",69,0) ; leaving rest of subroutine orphaned. "RTN","SAMIOUL",70,0) ; "RTN","SAMIOUL",71,0) ; 2020-01-16 ven/lgc 1.18.0 [no repo commit] "RTN","SAMIOUL",72,0) ; SAMIHL7: in MATCHLOG unbreak line MATCHLOG+13. "RTN","SAMIOUL",73,0) ; "RTN","SAMIOUL",74,0) ; 2020-02-04/12 ven/lgc 1.18.0.11+i11 ee53d8a "RTN","SAMIOUL",75,0) ; SAMIORM,SAMIORR ORM HL7 routines. "RTN","SAMIOUL",76,0) ; "RTN","SAMIOUL",77,0) ; 2020-07-24/28 ven/lgc 1.18.0.8/11+i8/i11 c08b051 "RTN","SAMIOUL",78,0) ; SAMIHL7,SAMIORM,SAMIORU: update for ORU messaging. "RTN","SAMIOUL",79,0) ; SAMIHL7: in top update incoming fields array example; passim "RTN","SAMIOUL",80,0) ; checkpoint into ^KBAP; in UPDTPTL1 add block to if new patient get "RTN","SAMIOUL",81,0) ; next ptien to use & set dfn; in MATCHLOG r/MATCHLOG w/HL7MATCHLOG, "RTN","SAMIOUL",82,0) ; if new patient load ORM msg data later, fix undef error, as didn't "RTN","SAMIOUL",83,0) ; get dfn from va vista server (only ssn) do not try to set remotedfn "RTN","SAMIOUL",84,0) ; field, build saminame index, call CAPTORM to save all ORM flds in "RTN","SAMIOUL",85,0) ; patient-lookup; add CAPTORM; in ACK clear & set HLA("HLA"). "RTN","SAMIOUL",86,0) ; SAMIORM: passim annotate, checkpoint into ^KBAP; in BLDAR get "RTN","SAMIOUL",87,0) ; inverse date, put HL7 nodes in samihl7; in DEBUG save msg id; add "RTN","SAMIOUL",88,0) ; PMSG; in PARSEMSG call PV1,ORC; in PID r/dfn w/ssn, get name flds, "RTN","SAMIOUL",89,0) ; get last5; add tag ORMADDR; add PV1,ORC to handle those segments; "RTN","SAMIOUL",90,0) ; in OBR reorg fields array; add CAMELCAS; update TEST. "RTN","SAMIOUL",91,0) ; SAMIORU: new routine? "RTN","SAMIOUL",92,0) ; "RTN","SAMIOUL",93,0) ; 2020-08-17/09-04 ven/lgc 1.18.0.11+i11 f3d7b38 "RTN","SAMIOUL",94,0) ; SAMIORU: update to remove gtm mod: extensive chgs passim, incl add "RTN","SAMIOUL",95,0) ; TESTALL,TESTOBXC; TESTOBX > TESTOBXV; PID2 > PID1; in DFN pull data "RTN","SAMIOUL",96,0) ; from entry in patient-lookup graph; in HL7VARS if msg id returned, "RTN","SAMIOUL",97,0) ; preface it with 1^; in ORMVARS don't confuse ORM msg id w/ORU msg "RTN","SAMIOUL",98,0) ; id; etc. "RTN","SAMIOUL",99,0) ; "RTN","SAMIOUL",100,0) ; 2021-02-03 ven/gpl 1.18.0.8+i8 54a0c2e "RTN","SAMIOUL",101,0) ; SAMIORU: in EN chg line length limit (climit) to 81. "RTN","SAMIOUL",102,0) ; "RTN","SAMIOUL",103,0) ; 2021-03-12/13 ven/lgc 1.18.0.8+i8 6093b45 "RTN","SAMIOUL",104,0) ; SAMIORU: larry's latest version of hl7 message building to "RTN","SAMIOUL",105,0) ; preserve note formatting: in TESTALL cut dead code, chg patient & "RTN","SAMIOUL",106,0) ; form, call EN&SAMIORU as function; in EN add debug code, cut climit "RTN","SAMIOUL",107,0) ; lines & cache filter; in DFN add tag FINDORM; in OBX cut climit "RTN","SAMIOUL",108,0) ; lines & dead code & BLDTXT. "RTN","SAMIOUL",109,0) ; "RTN","SAMIOUL",110,0) ; 2021-04-14/20 ven/gpl 1.18.0.11+i11 3a5756a,d7182d7 "RTN","SAMIOUL",111,0) ; SAMIHL7: fix for duplicate patients fr/HL7, fix for updating "RTN","SAMIOUL",112,0) ; patient-lookup graph on receipt of 2nd order: in UPDTPTL1 uppercase "RTN","SAMIOUL",113,0) ; names; in MATCHLOG prevent undef error. "RTN","SAMIOUL",114,0) ; "RTN","SAMIOUL",115,0) ; 2021-05-11 ven/lgc 1.18.0.11+i11 [no repo commit] "RTN","SAMIOUL",116,0) ; SAMIORM: in UPDTPTL stop updating hl7 counter node, because it was "RTN","SAMIOUL",117,0) ; updated earlier, just set hl7cnt; in OBR set fields("siteid"). "RTN","SAMIOUL",118,0) ; "RTN","SAMIOUL",119,0) ; 2021-05-20/21 ven/mcglk&toad 1.18.0.11+i11 43a4557,70fc6ba,129e96b "RTN","SAMIOUL",120,0) ; SAMIHL7: passim build hdr comments & dev log, lt refactor, bump "RTN","SAMIOUL",121,0) ; version. "RTN","SAMIOUL",122,0) ; "RTN","SAMIOUL",123,0) ; 2021-05-27 ven/lgc 1.18.0.11+i11 2093bf0,a51e714 "RTN","SAMIOUL",124,0) ; SAMIHL7,SAMIORM: new fixes for saving ORM & HL7 in patient-lookup "RTN","SAMIOUL",125,0) ; SAMIHL7: in section 1 update sample array; in MATCHLOG "RTN","SAMIOUL",126,0) ; r/fields(field)'="" w/'(field=""); in CAPTORM annotate, r/invdt "RTN","SAMIOUL",127,0) ; algo w/hl7cnt algo to align array structures of SAMIHL7 & SAMIORM, "RTN","SAMIOUL",128,0) ; to use counters for subscripts instead of inverse dates. "RTN","SAMIOUL",129,0) ; SAMIORM: in BLDARR, new hl7cnt, cut tag DEBUG, move inits of INFS, "RTN","SAMIOUL",130,0) ; INCC up to where DEBUG tag was; in PMSG fix KBaP typo, annotate, "RTN","SAMIOUL",131,0) ; refactor block, get msgid; in PID get suffix. "RTN","SAMIOUL",132,0) ; "RTN","SAMIOUL",133,0) ; 2021-06-01/04 ven/mcglk&toad 1.18.0.11+i11 7dd9410c "RTN","SAMIOUL",134,0) ; SAMIHL7: update log, add SAMIORM,ORR,ORU to log. "RTN","SAMIOUL",135,0) ; SAMIORM,ORR,ORU: annotate, document hl7 call structure, refactor, "RTN","SAMIOUL",136,0) ; bump version & dates. "RTN","SAMIOUL",137,0) ; "RTN","SAMIOUL",138,0) ; 2021-06-08 ven/toad 1.18.0.12-t1+i12 91baf32e,ba8c9192 "RTN","SAMIOUL",139,0) ; SAMIORM: in BLDARR fix new cnt, bug introduced in 06-04 refactor, "RTN","SAMIOUL",140,0) ; bump version; in PID uppercase patient name; cut CAMELCAS. "RTN","SAMIOUL",141,0) ; SAMIOUL < SAMIHL7: create routine from existing dev log. "RTN","SAMIOUL",142,0) ; "RTN","SAMIOUL",143,0) ; "RTN","SAMIOUL",144,0) ; "RTN","SAMIOUL",145,0) ;@contents "RTN","SAMIOUL",146,0) ; SAMIHL7 HL7 utilities "RTN","SAMIOUL",147,0) ; SAMIORM HL7 ORM > patient-lookup "RTN","SAMIOUL",148,0) ; SAMIORR HL7 ORR enrollment response "RTN","SAMIOUL",149,0) ; SAMIORU HL7 ORU enrollment response "RTN","SAMIOUL",150,0) ; SAMIOUL HL7 development log "RTN","SAMIOUL",151,0) ; "RTN","SAMIOUL",152,0) ; "RTN","SAMIOUL",153,0) ; "RTN","SAMIOUL",154,0) EOR ; end of routine SAMIOUL "RTN","SAMIPARM") 0^16^B7351392 "RTN","SAMIPARM",1,0) SAMIPARM ;ven/gpl - get params web service ;2021-07-01t17:45z "RTN","SAMIPARM",2,0) ;;18.0;SAMI;**12**;2020-01;Build 6 "RTN","SAMIPARM",3,0) ;;1.18.0.12-t3+i12 "RTN","SAMIPARM",4,0) ; "RTN","SAMIPARM",5,0) ; Routine SAMIPARM contains subroutines for implementing the VAPALS- "RTN","SAMIPARM",6,0) ; ELCAP get params web service. "RTN","SAMIPARM",7,0) ; "RTN","SAMIPARM",8,0) quit ; no entry from top "RTN","SAMIPARM",9,0) ; "RTN","SAMIPARM",10,0) ; "RTN","SAMIPARM",11,0) ; "RTN","SAMIPARM",12,0) ;@section 0 primary development "RTN","SAMIPARM",13,0) ; "RTN","SAMIPARM",14,0) ; "RTN","SAMIPARM",15,0) ; "RTN","SAMIPARM",16,0) ;@routine-credits "RTN","SAMIPARM",17,0) ;@primary-dev George P. Lilly (gpl) "RTN","SAMIPARM",18,0) ; gpl@vistaexpertise.net "RTN","SAMIPARM",19,0) ;@primary-dev-org Vista Expertise Network (ven) "RTN","SAMIPARM",20,0) ; http://vistaexpertise.net "RTN","SAMIPARM",21,0) ;@copyright 2021, gpl, all rights reserved "RTN","SAMIPARM",22,0) ;@license see routine SAMIUL "RTN","SAMIPARM",23,0) ; "RTN","SAMIPARM",24,0) ;@last-updated 2021-07-01t17:45z "RTN","SAMIPARM",25,0) ;@application Screening Applications Management (SAM) "RTN","SAMIPARM",26,0) ;@module Screening Applications Management - IELCAP (SAMI) "RTN","SAMIPARM",27,0) ;@suite-of-files SAMI Forms (311.101-311.199) "RTN","SAMIPARM",28,0) ;@version 1.18.0.12-t3+i12 "RTN","SAMIPARM",29,0) ;@release-date 2020-01 "RTN","SAMIPARM",30,0) ;@patch-list **12** "RTN","SAMIPARM",31,0) ; "RTN","SAMIPARM",32,0) ;@additional-dev Frederick D. S. Marshall (toad) "RTN","SAMIPARM",33,0) ; toad@vistaexpertise.net "RTN","SAMIPARM",34,0) ;@additional-dev Kenneth W. McGlothlen (mcglk) "RTN","SAMIPARM",35,0) ; mcglk@vistaexpertise.net "RTN","SAMIPARM",36,0) ; "RTN","SAMIPARM",37,0) ;@routine-log repo github.com:VA-PALS-ELCAP/SAMI-VAPALS-ELCAP.git "RTN","SAMIPARM",38,0) ; 2021-05-29/06-05 ven/gpl 1.18.0.12-t2+i12 46bab765,223b5900 "RTN","SAMIPARM",39,0) ; SAMIPARM new routine to implement new web service get params, "RTN","SAMIPARM",40,0) ; update for ssn in report, also, matching report; upgrade PARM with "RTN","SAMIPARM",41,0) ; SYS overrides, add systemDemoOnly & systemDemoUseDUZ. "RTN","SAMIPARM",42,0) ; "RTN","SAMIPARM",43,0) ; 2021-07-01 ven/mcglk&toad 1.18.0.12-t2+i12 cbf7e46b "RTN","SAMIPARM",44,0) ; SAMIPARM bump version & dates, add hdr comments & dev log. "RTN","SAMIPARM",45,0) ; "RTN","SAMIPARM",46,0) ;@contents "RTN","SAMIPARM",47,0) ; WSPARAMS web service WSPARAMS^SAMIPARM, site paramters "RTN","SAMIPARM",48,0) ; $$GET1PARM value of one parameter for site "RTN","SAMIPARM",49,0) ; GETARY return parameter array "RTN","SAMIPARM",50,0) ; ADDSVC init to install get params web service "RTN","SAMIPARM",51,0) ; "RTN","SAMIPARM",52,0) ; "RTN","SAMIPARM",53,0) ; "RTN","SAMIPARM",54,0) ;@section 1 subroutines "RTN","SAMIPARM",55,0) ; "RTN","SAMIPARM",56,0) ; "RTN","SAMIPARM",57,0) ; "RTN","SAMIPARM",58,0) WSPARAMS(parmsjson,filter) ; web service that returns the paramters to use "RTN","SAMIPARM",59,0) ; for the site, passed in as fliter("site"), as json "RTN","SAMIPARM",60,0) d ; "RTN","SAMIPARM",61,0) . n site "RTN","SAMIPARM",62,0) . s site=$g(filter("site")) "RTN","SAMIPARM",63,0) . i site="" s site=$g(filter("siteid")) "RTN","SAMIPARM",64,0) . q:site="" "RTN","SAMIPARM",65,0) . n parms "RTN","SAMIPARM",66,0) . d GETARY(.parms,site) "RTN","SAMIPARM",67,0) . ;s parms("socialSecurityNumber")="Patient ID" "RTN","SAMIPARM",68,0) . ;s parms("socialSecurityNumber.short")="PID" "RTN","SAMIPARM",69,0) . ;s parms("socialSecurityNumber.mask")="" "RTN","SAMIPARM",70,0) . ;s parms("socialSecurityNumber.regex")="" "RTN","SAMIPARM",71,0) . ; and so on "RTN","SAMIPARM",72,0) . ;n parmsjson "RTN","SAMIPARM",73,0) . d ENCODE^%webjson("parms","parmsjson") "RTN","SAMIPARM",74,0) . set HTTPRSP("mime")="application/json" "RTN","SAMIPARM",75,0) q "RTN","SAMIPARM",76,0) ; "RTN","SAMIPARM",77,0) ; "RTN","SAMIPARM",78,0) ; "RTN","SAMIPARM",79,0) GET1PARM(PARM,SITE) ; extrinsic returns the vale of PARM for site SITE "RTN","SAMIPARM",80,0) ; both passed by value "RTN","SAMIPARM",81,0) i '$d(SITE) S SITE="" "RTN","SAMIPARM",82,0) n ary "RTN","SAMIPARM",83,0) d GETARY(.ary,SITE) "RTN","SAMIPARM",84,0) ;ZWR ary "RTN","SAMIPARM",85,0) Q:'$D(ary) "" "RTN","SAMIPARM",86,0) q $g(ary(PARM)) "RTN","SAMIPARM",87,0) ; "RTN","SAMIPARM",88,0) ; "RTN","SAMIPARM",89,0) ; "RTN","SAMIPARM",90,0) GETARY(ARY,SITE) ; return the parameter array ART, passed by reference "RTN","SAMIPARM",91,0) ; "RTN","SAMIPARM",92,0) N SITEIEN S SITEIEN="" "RTN","SAMIPARM",93,0) I SITE'="" S SITEIEN=$O(^SAMI(311.12,"SYM",SITE,"")) "RTN","SAMIPARM",94,0) N DEFREC ; default record in SAMI PARAMETER DEFAULT 311.14 "RTN","SAMIPARM",95,0) I SITEIEN'="" S DEFREC=$$GET1^DIQ(311.12,SITEIEN_",",.04,"E") "RTN","SAMIPARM",96,0) I $G(DEFREC)="" S DEFREC="VHA" "RTN","SAMIPARM",97,0) M ARY=^SAMI(311.14,"D",DEFREC) "RTN","SAMIPARM",98,0) I SITE'="" M ARY=^SAMI(311.12,"D",SITE) "RTN","SAMIPARM",99,0) Q:'$D(^SAMI(311.14,"D","SYS")) "RTN","SAMIPARM",100,0) M ARY=^SAMI(311.14,"D","SYS") "RTN","SAMIPARM",101,0) Q "RTN","SAMIPARM",102,0) ; "RTN","SAMIPARM",103,0) ; "RTN","SAMIPARM",104,0) ; "RTN","SAMIPARM",105,0) ADDSVC() ; add the params webservice to the system "RTN","SAMIPARM",106,0) d addService^%webutils("GET","params","WSPARAMS^SAMIPARM") "RTN","SAMIPARM",107,0) Q "RTN","SAMIPARM",108,0) ; "RTN","SAMIPARM",109,0) ; "RTN","SAMIPARM",110,0) ; "RTN","SAMIPARM",111,0) EOR ; end of routine SAMIPARM "RTN","SAMIPAT") 0^17^B576661 "RTN","SAMIPAT",1,0) SAMIPAT ;ven/gpl - init subroutines ;2021-07-01t21:13z "RTN","SAMIPAT",2,0) ;;18.0;SAMI;**12**;2020-01;Build 6 "RTN","SAMIPAT",3,0) ;;1.18.0.12-t3+i12 "RTN","SAMIPAT",4,0) ; "RTN","SAMIPAT",5,0) ; Routine SAMIPAT contains VAPALS-ELCAP initialization subroutines "RTN","SAMIPAT",6,0) ; to use as KIDS pre- & post-installs & environment checks. "RTN","SAMIPAT",7,0) ; "RTN","SAMIPAT",8,0) quit ; no entry from top "RTN","SAMIPAT",9,0) ; "RTN","SAMIPAT",10,0) ; "RTN","SAMIPAT",11,0) ; "RTN","SAMIPAT",12,0) ;@section 0 primary development "RTN","SAMIPAT",13,0) ; "RTN","SAMIPAT",14,0) ; "RTN","SAMIPAT",15,0) ; "RTN","SAMIPAT",16,0) ;@routine-credits "RTN","SAMIPAT",17,0) ;@primary-dev Frederick D. S. Marshall (toad) "RTN","SAMIPAT",18,0) ; toad@vistaexpertise.net "RTN","SAMIPAT",19,0) ;@primary-dev-org Vista Expertise Network (ven) "RTN","SAMIPAT",20,0) ; http://vistaexpertise.net "RTN","SAMIPAT",21,0) ;@copyright 2021, toad, all rights reserved "RTN","SAMIPAT",22,0) ;@license see routine SAMIUL "RTN","SAMIPAT",23,0) ; "RTN","SAMIPAT",24,0) ;@last-updated 2021-07-01t21:13z "RTN","SAMIPAT",25,0) ;@application Screening Applications Management (SAM) "RTN","SAMIPAT",26,0) ;@module Screening Applications Management - IELCAP (SAMI) "RTN","SAMIPAT",27,0) ;@suite-of-files SAMI Forms (311.101-311.199) "RTN","SAMIPAT",28,0) ;@version 1.18.0.12-t3+i12 "RTN","SAMIPAT",29,0) ;@release-date 2020-01 "RTN","SAMIPAT",30,0) ;@patch-list **12** "RTN","SAMIPAT",31,0) ; "RTN","SAMIPAT",32,0) ;@additional-dev Kenneth W. McGlothlen (mcglk) "RTN","SAMIPAT",33,0) ; mcglk@vistaexpertise.net "RTN","SAMIPAT",34,0) ;@additional-dev George P. Lilly (gpl) "RTN","SAMIPAT",35,0) ; gpl@vistaexpertise.net "RTN","SAMIPAT",36,0) ; "RTN","SAMIPAT",37,0) ;@routine-log repo github.com:VA-PALS-ELCAP/SAMI-VAPALS-ELCAP.git "RTN","SAMIPAT",38,0) ; 2021-07-01 ven/mcglk&toad 1.18.0.12-t2+i12 cbf7e46b "RTN","SAMIPAT",39,0) ; SAMIPAT new routine, new POS1812 post-install for patch 12. "RTN","SAMIPAT",40,0) ; "RTN","SAMIPAT",41,0) ;@contents "RTN","SAMIPAT",42,0) ; POS1812 kids post-install for sami 1.18.0.12-t2+i12 "RTN","SAMIPAT",43,0) ; "RTN","SAMIPAT",44,0) ; "RTN","SAMIPAT",45,0) ; "RTN","SAMIPAT",46,0) ;@section 1 subroutines "RTN","SAMIPAT",47,0) ; "RTN","SAMIPAT",48,0) ; "RTN","SAMIPAT",49,0) ; "RTN","SAMIPAT",50,0) POS1812 ; kids post-install for sami 1.18.0.12-t2+i12 "RTN","SAMIPAT",51,0) ; "RTN","SAMIPAT",52,0) do ADDSVC^SAMIPARM ; install get params web service "RTN","SAMIPAT",53,0) ; "RTN","SAMIPAT",54,0) ; in honor of Tchaikovsky's overture: boom "RTN","SAMIPAT",55,0) ; "RTN","SAMIPAT",56,0) quit ; end of POS1812 "RTN","SAMIPAT",57,0) ; "RTN","SAMIPAT",58,0) ; "RTN","SAMIPAT",59,0) ; "RTN","SAMIPAT",60,0) EOR ; end of routine SAMIPAT "RTN","SAMISITE") 0^18^B91065013 "RTN","SAMISITE",1,0) SAMISITE ;ven/gpl&arc - signon & site access ;2021-07-07t16:52z "RTN","SAMISITE",2,0) ;;18.0;SAMI;**5,12**;2020-01;Build 6 "RTN","SAMISITE",3,0) ;;1.18.0.12-t3+i12 "RTN","SAMISITE",4,0) ; "RTN","SAMISITE",5,0) ; Routine SAMISITE contains subroutines for implementing the VAPALS- "RTN","SAMISITE",6,0) ; ELCAP "RTN","SAMISITE",7,0) ; "RTN","SAMISITE",8,0) quit ; no entry from top "RTN","SAMISITE",9,0) ; "RTN","SAMISITE",10,0) ; "RTN","SAMISITE",11,0) ; "RTN","SAMISITE",12,0) ;@section 0 primary development "RTN","SAMISITE",13,0) ; "RTN","SAMISITE",14,0) ; "RTN","SAMISITE",15,0) ; "RTN","SAMISITE",16,0) ;@routine-credits "RTN","SAMISITE",17,0) ;@primary-dev: George P. Lilly (gpl) "RTN","SAMISITE",18,0) ; gpl@vistaexpertise.net "RTN","SAMISITE",19,0) ;@primary-dev-org: Vista Expertise Network (ven) "RTN","SAMISITE",20,0) ; http://vistaexpertise.net "RTN","SAMISITE",21,0) ;@copyright: 2017/2021, gpl, all rights reserved "RTN","SAMISITE",22,0) ;@license see routine SAMIUL "RTN","SAMISITE",23,0) ; "RTN","SAMISITE",24,0) ;@last-updated 2021-07-07t16:52z "RTN","SAMISITE",25,0) ;@application Screening Applications Management (SAM) "RTN","SAMISITE",26,0) ;@module Screening Applications Management - IELCAP (SAMI) "RTN","SAMISITE",27,0) ;@suite-of-files SAMI Forms (311.101-311.199) "RTN","SAMISITE",28,0) ;@version 1.18.0.12-t3+i12 "RTN","SAMISITE",29,0) ;@release-date 2020-01 "RTN","SAMISITE",30,0) ;@patch-list **5,12** "RTN","SAMISITE",31,0) ; "RTN","SAMISITE",32,0) ;@additional-dev: Alexis Carlson (arc) "RTN","SAMISITE",33,0) ; alexis@vistaexpertise.net "RTN","SAMISITE",34,0) ;@additional-dev Frederick D. S. Marshall (toad) "RTN","SAMISITE",35,0) ; toad@vistaexpertise.net "RTN","SAMISITE",36,0) ;@additional-dev Kenneth W. McGlothlen (mcglk) "RTN","SAMISITE",37,0) ; mcglk@vistaexpertise.net "RTN","SAMISITE",38,0) ; "RTN","SAMISITE",39,0) ;@routine-log repo github.com:VA-PALS-ELCAP/SAMI-VAPALS-ELCAP.git "RTN","SAMISITE",40,0) ; 2020-04-02/05-26 ven/gpl 1.18.0.5+i5 d36b7cad,36607664,521e0bdc, "RTN","SAMISITE",41,0) ; d018f52e,156be19e,476b2ff4,0a1538ef "RTN","SAMISITE",42,0) ; SAMISITE add multitenancy, fix bug in logout, fix sitetitle on 1st "RTN","SAMISITE",43,0) ; time in, add superuser site selection feature, fix bug in cache. "RTN","SAMISITE",44,0) ; "RTN","SAMISITE",45,0) ; 2021-06-05 ven/gpl 1.18.0.12-t2+i12 223b5900 "RTN","SAMISITE",46,0) ; SAMISITE upgrade parameter with system overrides, add "RTN","SAMISITE",47,0) ; systemDemoOnly & systemDemoUseDUZ parameters. "RTN","SAMISITE",48,0) ; "RTN","SAMISITE",49,0) ; 2021-07-01/07 ven/mcglk&toad&gpl 1.18.0.12-t2+i12 cbf7e46b, "RTN","SAMISITE",50,0) ; bfeea24b,1dd91fea "RTN","SAMISITE",51,0) ; SAMISITE bump version & dates, add hdr comments & dev log; in "RTN","SAMISITE",52,0) ; FINDSITE add missing 0 to quit. "RTN","SAMISITE",53,0) ; "RTN","SAMISITE",54,0) ;@to-do "RTN","SAMISITE",55,0) ; Add label comments "RTN","SAMISITE",56,0) ; "RTN","SAMISITE",57,0) ;@contents "RTN","SAMISITE",58,0) ; $$FINDSITE current site for user "RTN","SAMISITE",59,0) ; $$USER ien of user accessing system "RTN","SAMISITE",60,0) ; $$SITE ien of institution file entry for user's site "RTN","SAMISITE",61,0) ; $$SITEID symbol for site "RTN","SAMISITE",62,0) ; $$SITEACTV is site active? "RTN","SAMISITE",63,0) ; $$SITENM site name from ien "RTN","SAMISITE",64,0) ; $$SITENM2 site name from symbol "RTN","SAMISITE",65,0) ; LOGIN login processing "RTN","SAMISITE",66,0) ; $$SIGNON signon with access & verify code "RTN","SAMISITE",67,0) ; SUPER site selection page for super users "RTN","SAMISITE",68,0) ; UPGRADE init: convert to multi-tenancy "RTN","SAMISITE",69,0) ; "RTN","SAMISITE",70,0) ; "RTN","SAMISITE",71,0) ; "RTN","SAMISITE",72,0) ;@section 1 subroutines "RTN","SAMISITE",73,0) ; "RTN","SAMISITE",74,0) ; "RTN","SAMISITE",75,0) ; "RTN","SAMISITE",76,0) FINDSITE(SAMIRETURN,ARGS) ; extrinsic which returns the site "RTN","SAMISITE",77,0) ; to be used by this user: ARGS("siteid")=siteid and "RTN","SAMISITE",78,0) ; ARGS("sitetitle")=sitename - siteid "RTN","SAMISITE",79,0) ; 1 for success "RTN","SAMISITE",80,0) ; 0 for fail - exit; page to be displayed is in SAMIRETURN "RTN","SAMISITE",81,0) ; "RTN","SAMISITE",82,0) ;d ^ZTER "RTN","SAMISITE",83,0) n user "RTN","SAMISITE",84,0) s user=$$USER() "RTN","SAMISITE",85,0) i user=-1 d q 0 "RTN","SAMISITE",86,0) . n vals "RTN","SAMISITE",87,0) . s vals("siteid")="" "RTN","SAMISITE",88,0) . s vals("sitetitle")="Unknown Site" "RTN","SAMISITE",89,0) . s vals("errorMessage")="" "RTN","SAMISITE",90,0) . d RTNERR^SAMIHOM4(.SAMIRETURN,"vapals:login",.vals) "RTN","SAMISITE",91,0) . ;s ARGS("errorMessage")="Error, user not found" "RTN","SAMISITE",92,0) . ;d RTNERR^SAMIHOM4(.SAMIRETURN,"vapals:syserror",.ARGS) "RTN","SAMISITE",93,0) ; "RTN","SAMISITE",94,0) ;d q 0 "RTN","SAMISITE",95,0) ;. s ARGS("errorMessage")="User is found: "_user "RTN","SAMISITE",96,0) ;. d RTNERR^SAMIHOM4(.SAMIRETURN,"vapals:syserror",.ARGS) "RTN","SAMISITE",97,0) ; "RTN","SAMISITE",98,0) n site,siteid,siteactv,sitenm "RTN","SAMISITE",99,0) ; "RTN","SAMISITE",100,0) i $o(^SAMI(311.13,"B",user,""))'="" d q 0 ; superuser "RTN","SAMISITE",101,0) . d SUPER("SAMIRETURN",.ARGS) "RTN","SAMISITE",102,0) . s HTTPRSP("mime")="text/html" "RTN","SAMISITE",103,0) ; "RTN","SAMISITE",104,0) s site=$$SITE(user) "RTN","SAMISITE",105,0) i site<1 s site=-1 "RTN","SAMISITE",106,0) i site=-1 d q 0 "RTN","SAMISITE",107,0) . s ARGS("errorMessage")="Site not found for user "_user "RTN","SAMISITE",108,0) . d RTNERR^SAMIHOM4(.SAMIRETURN,"vapals:syserror",.ARGS) "RTN","SAMISITE",109,0) ; "RTN","SAMISITE",110,0) s siteid=$$SITEID(site) "RTN","SAMISITE",111,0) i siteid=-1 d q 0 "RTN","SAMISITE",112,0) . s ARGS("errorMessage")="Site ID not found for site "_site "RTN","SAMISITE",113,0) . d RTNERR^SAMIHOM4(.SAMIRETURN,"vapals:syserror",.ARGS) "RTN","SAMISITE",114,0) ; "RTN","SAMISITE",115,0) s siteactv=$$SITEACTV(site) "RTN","SAMISITE",116,0) i siteactv<1 d q 0 "RTN","SAMISITE",117,0) . s ARGS("errorMessage")="Site not active: "_siteid "RTN","SAMISITE",118,0) . d RTNERR^SAMIHOM4(.SAMIRETURN,"vapals:syserror",.ARGS) "RTN","SAMISITE",119,0) ; "RTN","SAMISITE",120,0) s sitenm=$$SITENM(site) "RTN","SAMISITE",121,0) i sitenm=-1 d q 0 "RTN","SAMISITE",122,0) . s ARGS("errorMessage")="Site name not found: "_siteid "RTN","SAMISITE",123,0) . d RTNERR^SAMIHOM4(.SAMIRETURN,"vapals:syserror",.ARGS) "RTN","SAMISITE",124,0) ; "RTN","SAMISITE",125,0) s ARGS("siteid")=siteid "RTN","SAMISITE",126,0) s ARGS("sitetitle")=$$SITENM(site)_" - "_siteid "RTN","SAMISITE",127,0) q 1 "RTN","SAMISITE",128,0) ; "RTN","SAMISITE",129,0) ; "RTN","SAMISITE",130,0) ; "RTN","SAMISITE",131,0) USER() ; extrinsic returns the DUZ of the user accessing the system "RTN","SAMISITE",132,0) ; -1 means user not known "RTN","SAMISITE",133,0) n rtn s rtn=-1 "RTN","SAMISITE",134,0) s rtn=+$G(DUZ) "RTN","SAMISITE",135,0) i rtn=0 s rtn=-1 "RTN","SAMISITE",136,0) q rtn "RTN","SAMISITE",137,0) ; "RTN","SAMISITE",138,0) ; "RTN","SAMISITE",139,0) ; "RTN","SAMISITE",140,0) SITE(USER) ; extrinsic returns the pointer to the Institution file "RTN","SAMISITE",141,0) ; which is the site of the user "RTN","SAMISITE",142,0) ; -1 means site not found "RTN","SAMISITE",143,0) ; zero means site not active "RTN","SAMISITE",144,0) n rtn "RTN","SAMISITE",145,0) s rtn=$o(^VA(200,USER,2,0)) "RTN","SAMISITE",146,0) i +rtn="" s rtn=-1 "RTN","SAMISITE",147,0) q rtn "RTN","SAMISITE",148,0) ; "RTN","SAMISITE",149,0) ; "RTN","SAMISITE",150,0) ; "RTN","SAMISITE",151,0) SITEID(SITE) ; extrinsic returns the Site Symbol for SITE "RTN","SAMISITE",152,0) ; this is found in the SAMI SITE file "RTN","SAMISITE",153,0) ; null means SITEID not found "RTN","SAMISITE",154,0) n rtn s rtn=-1 "RTN","SAMISITE",155,0) n ien s ien=$o(^SAMI(311.12,"B",SITE,"")) "RTN","SAMISITE",156,0) q:ien="" -1 "RTN","SAMISITE",157,0) s rtn=$$GET1^DIQ(311.12,ien_",",.02) "RTN","SAMISITE",158,0) q rtn "RTN","SAMISITE",159,0) ; "RTN","SAMISITE",160,0) ; "RTN","SAMISITE",161,0) ; "RTN","SAMISITE",162,0) SITEACTV(SITE) ; Extrinsic which returns 1 if the site is active "RTN","SAMISITE",163,0) ; otherwise 0 "RTN","SAMISITE",164,0) n rtn s rtn=-1 "RTN","SAMISITE",165,0) n ien s ien=$o(^SAMI(311.12,"B",SITE,"")) "RTN","SAMISITE",166,0) q:ien="" -1 "RTN","SAMISITE",167,0) s rtn=$$GET1^DIQ(311.12,ien_",",.03,"I") "RTN","SAMISITE",168,0) q rtn "RTN","SAMISITE",169,0) ; "RTN","SAMISITE",170,0) ; "RTN","SAMISITE",171,0) ; "RTN","SAMISITE",172,0) SITENM(SITE) ; Extrinsic which returns the Site name "RTN","SAMISITE",173,0) ; "RTN","SAMISITE",174,0) n rtn s rtn=-1 "RTN","SAMISITE",175,0) s rtn=$$GET1^DIQ(4,SITE_",",.01) "RTN","SAMISITE",176,0) i rtn="" s rtn=-1 "RTN","SAMISITE",177,0) q rtn "RTN","SAMISITE",178,0) ; "RTN","SAMISITE",179,0) ; "RTN","SAMISITE",180,0) ; "RTN","SAMISITE",181,0) SITENM2(SITEID) ; Extrinsic which returns the Site name from the Site Symbol "RTN","SAMISITE",182,0) ; "RTN","SAMISITE",183,0) q:SITEID="" -1 "RTN","SAMISITE",184,0) n siteien "RTN","SAMISITE",185,0) s siteien=$o(^SAMI(311.12,"SYM",SITEID,"")) "RTN","SAMISITE",186,0) n site "RTN","SAMISITE",187,0) q $$GET1^DIQ(311.12,siteien_",",.01,"E") "RTN","SAMISITE",188,0) ; "RTN","SAMISITE",189,0) ; "RTN","SAMISITE",190,0) ; "RTN","SAMISITE",191,0) LOGIN(RTN,VALS) ; login processing "RTN","SAMISITE",192,0) ; "RTN","SAMISITE",193,0) n access,verify "RTN","SAMISITE",194,0) s access=$g(VALS("access")) "RTN","SAMISITE",195,0) s verify=$g(VALS("verify")) "RTN","SAMISITE",196,0) ;i verify="@demo123" s verify="@demo321" "RTN","SAMISITE",197,0) ;i verify="@demo123" s verify="$#happy10" "RTN","SAMISITE",198,0) ;i access="ZZZUSER1" s access="SUPER6" "RTN","SAMISITE",199,0) ;i access="" d ; "RTN","SAMISITE",200,0) ;. s access="PHXNAV1" "RTN","SAMISITE",201,0) ;. s verify="$#happy6" "RTN","SAMISITE",202,0) I $$GET1PARM^SAMIPARM("systemDemoOnly")="true" D Q ; "RTN","SAMISITE",203,0) . S DUZ=$$GET1PARM^SAMIPARM("systemDemoUseDUZ") "RTN","SAMISITE",204,0) . I +DUZ=0 D ; "RTN","SAMISITE",205,0) . . S DUZ=$O(^SAMI(311.13,"B","")) "RTN","SAMISITE",206,0) . s VALS("samiroute")="" "RTN","SAMISITE",207,0) . s VALS("siteid")="" "RTN","SAMISITE",208,0) . d WSHOME^SAMIHOM3(.RTN,.VALS) "RTN","SAMISITE",209,0) n ACVC s ACVC=access_";"_verify "RTN","SAMISITE",210,0) i $$SIGNON(ACVC) D Q ; "RTN","SAMISITE",211,0) . s VALS("samiroute")="" "RTN","SAMISITE",212,0) . s VALS("siteid")="" "RTN","SAMISITE",213,0) . d WSHOME^SAMIHOM3(.RTN,.VALS) "RTN","SAMISITE",214,0) else D Q ; "RTN","SAMISITE",215,0) . s VALS("errorMessage")="Invalid login" "RTN","SAMISITE",216,0) . d RTNERR^SAMIHOM4(.RTN,"vapals:login",.VALS) "RTN","SAMISITE",217,0) q "RTN","SAMISITE",218,0) ; "RTN","SAMISITE",219,0) ; "RTN","SAMISITE",220,0) ; "RTN","SAMISITE",221,0) SIGNON(ACVC) ; extrinsic returns 1 if signon is successful, else 0 "RTN","SAMISITE",222,0) ; Sign-on "RTN","SAMISITE",223,0) N IO S IO=$P "RTN","SAMISITE",224,0) D SETUP^XUSRB() ; Only partition set-up; No single sign-on or CAPRI "RTN","SAMISITE",225,0) N RTN D VALIDAV^XUSRB(.RTN,$$ENCRYP^XUSRB1(ACVC)) ; sign-on call "RTN","SAMISITE",226,0) I RTN(0)>0,'RTN(2) Q 1 ; Sign on successful! "RTN","SAMISITE",227,0) I RTN(0)=0,RTN(2) Q 0 ; Verify Code must be changed NOW! "RTN","SAMISITE",228,0) I $L(RTN(3)) Q 0 ; Error Message "RTN","SAMISITE",229,0) ; "RTN","SAMISITE",230,0) q "RTN","SAMISITE",231,0) ; "RTN","SAMISITE",232,0) ; "RTN","SAMISITE",233,0) ; "RTN","SAMISITE",234,0) SUPER(RTN,FILTER) ; returns site selection page for super users "RTN","SAMISITE",235,0) ; "RTN","SAMISITE",236,0) n temp "RTN","SAMISITE",237,0) d getThis^%wd("temp","blank_no_nav.html") "RTN","SAMISITE",238,0) q:'$d(temp) "RTN","SAMISITE",239,0) n cnt s cnt=0 "RTN","SAMISITE",240,0) n zj s zj=0 "RTN","SAMISITE",241,0) f s zj=$o(temp(zj)) q:temp(zj)["Insert" q:+zj=0 d ; "RTN","SAMISITE",242,0) . n ln s ln=temp(zj) "RTN","SAMISITE",243,0) . i ln["PAGE NAME" s ln="Site Selection" "RTN","SAMISITE",244,0) . d LOAD^SAMIFORM(.ln,"","") "RTN","SAMISITE",245,0) . s cnt=cnt+1 "RTN","SAMISITE",246,0) . s @RTN@(cnt)=ln "RTN","SAMISITE",247,0) s cnt=cnt+1 "RTN","SAMISITE",248,0) s @RTN@(cnt)="<ul>" "RTN","SAMISITE",249,0) n gn s gn=$na(^SAMI(311.12,"B")) "RTN","SAMISITE",250,0) n zi s zi=0 "RTN","SAMISITE",251,0) f s zi=$o(@gn@(zi)) q:+zi=0 d ; "RTN","SAMISITE",252,0) . n zien s zien=$o(@gn@(zi,"")) "RTN","SAMISITE",253,0) . n active "RTN","SAMISITE",254,0) . s active=$$GET1^DIQ(311.12,zien_",",.03,"I") "RTN","SAMISITE",255,0) . q:active=0 "RTN","SAMISITE",256,0) . n name "RTN","SAMISITE",257,0) . s name=$$SITENM(zi)_" - "_$$SITEID(zi) "RTN","SAMISITE",258,0) . n link "RTN","SAMISITE",259,0) . s link="<li>" "RTN","SAMISITE",260,0) . s link=link_"<a class=""navigation"" data-method=""post""" "RTN","SAMISITE",261,0) . s link=link_" data-samiroute=""home"" data-siteid="""_$$SITEID(zi)_"""" "RTN","SAMISITE",262,0) . ;s link=link_" data-site="""_$$SITEID(zi)_"""" "RTN","SAMISITE",263,0) . ;s link=link_" href=""#!"">"_$$SITENM(zi)_" - "_$$SITEID(zi) "RTN","SAMISITE",264,0) . s link=link_" href=""/vapals"">"_name "RTN","SAMISITE",265,0) . s link=link_"</a></li>" "RTN","SAMISITE",266,0) . ;n link "RTN","SAMISITE",267,0) . ;s link="<form method=POST action=""/vapals"">" "RTN","SAMISITE",268,0) . ;s link=link_"<input type=hidden name=""samiroute"" value=""home"">" "RTN","SAMISITE",269,0) . ;s link=link_"<input type=hidden name=""siteid"" value="""_$$SITEID(zi)_""">" "RTN","SAMISITE",270,0) . ;s link=link_"<input value="""_name_""" class=""btn btn-link"" role=""link"" type=""submit""></form>" "RTN","SAMISITE",271,0) . s cnt=cnt+1 "RTN","SAMISITE",272,0) . s @RTN@(cnt)=link "RTN","SAMISITE",273,0) s cnt=cnt+1 "RTN","SAMISITE",274,0) s @RTN@(cnt)="</ul>" "RTN","SAMISITE",275,0) n zk s zk=zj+1 "RTN","SAMISITE",276,0) f s zk=$o(temp(zk)) q:+zk=0 d ; "RTN","SAMISITE",277,0) . s cnt=cnt+1 "RTN","SAMISITE",278,0) . s @RTN@(cnt)=temp(zk) "RTN","SAMISITE",279,0) q "RTN","SAMISITE",280,0) ; "RTN","SAMISITE",281,0) ; "RTN","SAMISITE",282,0) ; "RTN","SAMISITE",283,0) UPGRADE() ; convert VAPALS system to Multi-tenancy by adding siteid "RTN","SAMISITE",284,0) ; to all existing patients - runs one time as the Post Install "RTN","SAMISITE",285,0) ; to the installation "RTN","SAMISITE",286,0) ; "RTN","SAMISITE",287,0) n lroot,proot,lien,pien "RTN","SAMISITE",288,0) s (lien,pien)=0 "RTN","SAMISITE",289,0) s lroot=$$setroot^%wd("patient-lookup") "RTN","SAMISITE",290,0) s proot=$$setroot^%wd("vapals-patients") "RTN","SAMISITE",291,0) n site "RTN","SAMISITE",292,0) s site=$$GET^XPAR("SYS","SAMI SID PREFIX",,"Q") "RTN","SAMISITE",293,0) i site="" d q ; "RTN","SAMISITE",294,0) . D MES^XPDUTL("No default site returned by SAMI SID PREFIX parameter, exiting") "RTN","SAMISITE",295,0) n cnt s cnt=0 "RTN","SAMISITE",296,0) f s lien=$o(@lroot@(lien)) q:+lien=0 d ; "RTN","SAMISITE",297,0) . q:$g(@lroot@(lien,"siteid"))'="" "RTN","SAMISITE",298,0) . n nomatch s nomatch=0 "RTN","SAMISITE",299,0) . n dfn s dfn=$g(@lroot@(lien,"dfn")) "RTN","SAMISITE",300,0) . i dfn="" d q ; "RTN","SAMISITE",301,0) . . D MES^XPDUTL("Error, no dfn found for lien "_lien) "RTN","SAMISITE",302,0) . s pien=$o(@proot@("dfn",dfn,"")) "RTN","SAMISITE",303,0) . ; make sure the first 3 chars of the studyid matches the site "RTN","SAMISITE",304,0) . i pien'="" d q:nomatch "RTN","SAMISITE",305,0) . . n psite,psid "RTN","SAMISITE",306,0) . . s psid=$g(@proot@(pien,"sisid")) "RTN","SAMISITE",307,0) . . i psid="" s nomatch=1 q ; "RTN","SAMISITE",308,0) . . i $e(psid,1,3)'=site s nomatch=1 d q ; "RTN","SAMISITE",309,0) . . . d MES^XPDUTL("skipping record - studyid "_psid_" does not match site "_site) "RTN","SAMISITE",310,0) . ;w !,"lien "_lien_" being set to "_site "RTN","SAMISITE",311,0) . s cnt=cnt+1 "RTN","SAMISITE",312,0) . s @lroot@(lien,"siteid")=site "RTN","SAMISITE",313,0) i cnt>0 d ; "RTN","SAMISITE",314,0) . d MES^XPDUTL("Multi-tenancy upgrade successful") "RTN","SAMISITE",315,0) . d MES^XPDUTL(cnt_" patient records set to site "_site) "RTN","SAMISITE",316,0) q "RTN","SAMISITE",317,0) ; "RTN","SAMISITE",318,0) ; "RTN","SAMISITE",319,0) ; "RTN","SAMISITE",320,0) EOR ; end of routine SAMISITE "RTN","SAMITTW") 0^19^B5460827 "RTN","SAMITTW",1,0) SAMITTW ;ven/gpl - text-processing utilities ;2021-07-01t21:37z "RTN","SAMITTW",2,0) ;;18.0;SAMI;**12**;2020-01;Build 6 "RTN","SAMITTW",3,0) ;;1.18.0.12-t3+i12 "RTN","SAMITTW",4,0) ; "RTN","SAMITTW",5,0) ; Routine SAMITTW contains subroutines for formatting text fields for "RTN","SAMITTW",6,0) ; VAPALS-ELCAP forms. "RTN","SAMITTW",7,0) ; "RTN","SAMITTW",8,0) quit ; no entry from top "RTN","SAMITTW",9,0) ; "RTN","SAMITTW",10,0) ; "RTN","SAMITTW",11,0) ; "RTN","SAMITTW",12,0) ;@section 0 primary development "RTN","SAMITTW",13,0) ; "RTN","SAMITTW",14,0) ; "RTN","SAMITTW",15,0) ; "RTN","SAMITTW",16,0) ;@routine-credits "RTN","SAMITTW",17,0) ;@primary-dev: George P. Lilly (gpl) "RTN","SAMITTW",18,0) ; gpl@vistaexpertise.net "RTN","SAMITTW",19,0) ;@primary-dev-org: Vista Expertise Network (ven) "RTN","SAMITTW",20,0) ; http://vistaexpertise.net "RTN","SAMITTW",21,0) ;@copyright: 2021, gpl, all rights reserved "RTN","SAMITTW",22,0) ;@license see routine SAMIUL "RTN","SAMITTW",23,0) ; "RTN","SAMITTW",24,0) ;@last-updated 2021-07-01t21:37z "RTN","SAMITTW",25,0) ;@application Screening Applications Management (SAM) "RTN","SAMITTW",26,0) ;@module Screening Applications Management - IELCAP (SAMI) "RTN","SAMITTW",27,0) ;@suite-of-files SAMI Forms (311.101-311.199) "RTN","SAMITTW",28,0) ;@version 1.18.0.12-t3+i12 "RTN","SAMITTW",29,0) ;@release-date 2020-01 "RTN","SAMITTW",30,0) ;@patch-list **12** "RTN","SAMITTW",31,0) ; "RTN","SAMITTW",32,0) ;@additional-dev Frederick D. S. Marshall (toad) "RTN","SAMITTW",33,0) ; toad@vistaexpertise.net "RTN","SAMITTW",34,0) ;@additional-dev Kenneth W. McGlothlen (mcglk) "RTN","SAMITTW",35,0) ; mcglk@vistaexpertise.net "RTN","SAMITTW",36,0) ; "RTN","SAMITTW",37,0) ;@routine-log repo github.com:VA-PALS-ELCAP/SAMI-VAPALS-ELCAP.git "RTN","SAMITTW",38,0) ; 2021-06-29 ven/gpl 1.18.0.12-t2+i12 a5bbd37a "RTN","SAMITTW",39,0) ; SAMITTW format text box for intake & followup notes; new text- "RTN","SAMITTW",40,0) ; processing utils. "RTN","SAMITTW",41,0) ; "RTN","SAMITTW",42,0) ; 2021-07-01 ven/mcglk&toad 1.18.0.12-t2+i12 cbf7e46b,fa794d60 "RTN","SAMITTW",43,0) ; SAMITTW bump version & dates, add hdr comments & dev log. "RTN","SAMITTW",44,0) ; "RTN","SAMITTW",45,0) ;@contents "RTN","SAMITTW",46,0) ; $$PRNTABLE remove non-printable characters except CR "RTN","SAMITTW",47,0) ; $$CRWRAP wrap text line based on margin or embedded CRLF "RTN","SAMITTW",48,0) ; "RTN","SAMITTW",49,0) ; "RTN","SAMITTW",50,0) ; "RTN","SAMITTW",51,0) ;@section 1 subroutines "RTN","SAMITTW",52,0) ; "RTN","SAMITTW",53,0) ; "RTN","SAMITTW",54,0) ; "RTN","SAMITTW",55,0) PRNTABLE(ln) ; Extrinsic which removes all non-printable character except CR "RTN","SAMITTW",56,0) n zi,zn,ln2 "RTN","SAMITTW",57,0) s ln2="" "RTN","SAMITTW",58,0) f zi=1:1:$l(ln) d ; "RTN","SAMITTW",59,0) . s zn=$ASCII($e(ln,zi)) "RTN","SAMITTW",60,0) . q:zn>126 "RTN","SAMITTW",61,0) . q:zn<13 "RTN","SAMITTW",62,0) . q:((zn>13)&(zn<30)) "RTN","SAMITTW",63,0) . s ln2=ln2_$CHAR(zn) "RTN","SAMITTW",64,0) ; "RTN","SAMITTW",65,0) q ln2 "RTN","SAMITTW",66,0) ; "RTN","SAMITTW",67,0) ; "RTN","SAMITTW",68,0) ; "RTN","SAMITTW",69,0) CRWRAP(ln,dest,cnt,margin) ; extrinsic which will wrap a text line into "RTN","SAMITTW",70,0) ; multiple lines based on margin, which defaults to 80, or imbedded CRLF "RTN","SAMITTW",71,0) ; or CR. ln and margin are passed by value. dest is passed by name and "RTN","SAMITTW",72,0) ; cnt is passed by reference and is updated. "RTN","SAMITTW",73,0) ; extrinsic returns 1 if output was added to dest "RTN","SAMITTW",74,0) ; "RTN","SAMITTW",75,0) i $l(ln)<10 q 0 ; skip short fields "RTN","SAMITTW",76,0) s ln=$$PRNTABLE^SAMITTW(ln) "RTN","SAMITTW",77,0) ;s ^gpl("ln",$o(^gpl("ln"," "),-1)+1)=ln "RTN","SAMITTW",78,0) i '$d(margin) s margin=80 "RTN","SAMITTW",79,0) i ln[$CHAR(13) d q 1 "RTN","SAMITTW",80,0) . n cr s cr=$char(13) "RTN","SAMITTW",81,0) . n crn s crn=$l(ln,$char(13)) "RTN","SAMITTW",82,0) . i $l(ln,$char(13,10))=crn s cr=$char(13,10) "RTN","SAMITTW",83,0) . n i "RTN","SAMITTW",84,0) . f i=1:1:crn d ; "RTN","SAMITTW",85,0) . . n eln s eln="" "RTN","SAMITTW",86,0) . . i cr=$char(13) s eln(1)=$p(ln,$char(13),i) "RTN","SAMITTW",87,0) . . i cr=$char(13,10) s eln(1)=$p(ln,$char(13,10),i) "RTN","SAMITTW",88,0) . . ;s ^gpl("note",i)=eln(1) "RTN","SAMITTW",89,0) . . q:eln(1)="" "RTN","SAMITTW",90,0) . . i $l(eln(1))>margin d wrap^%tt("eln",margin,dest) q "RTN","SAMITTW",91,0) . . n lnn s lnn=$o(@dest@(" "),-1)+1 "RTN","SAMITTW",92,0) . . s @dest@(lnn)=eln(1) "RTN","SAMITTW",93,0) . ; "RTN","SAMITTW",94,0) i $l(ln)>margin d q 1 ; "RTN","SAMITTW",95,0) . n eln s eln(1)=ln "RTN","SAMITTW",96,0) . d wrap^%tt("eln",margin,dest) "RTN","SAMITTW",97,0) ; "RTN","SAMITTW",98,0) q 0 "RTN","SAMITTW",99,0) ; "RTN","SAMITTW",100,0) ; "RTN","SAMITTW",101,0) ; "RTN","SAMITTW",102,0) EOR ; end of routine SAMITTW "RTN","SAMIUR") 0^20^B504449514 "RTN","SAMIUR",1,0) SAMIUR ;ven/gpl - user reports ;2021-07-12t23:19z "RTN","SAMIUR",2,0) ;;18.0;SAMI;**5,10,11,12**;2020-01;Build 6 "RTN","SAMIUR",3,0) ;;1.18.0.12-t3+i12 "RTN","SAMIUR",4,0) ; "RTN","SAMIUR",5,0) ; SAMIUR contains a web service & associated subroutines to produce "RTN","SAMIUR",6,0) ; VAPALS-ELCAP user reports. "RTN","SAMIUR",7,0) ; "RTN","SAMIUR",8,0) quit ; no entry from top "RTN","SAMIUR",9,0) ; "RTN","SAMIUR",10,0) ; "RTN","SAMIUR",11,0) ; "RTN","SAMIUR",12,0) ;@section 0 primary development "RTN","SAMIUR",13,0) ; "RTN","SAMIUR",14,0) ; "RTN","SAMIUR",15,0) ; "RTN","SAMIUR",16,0) ;@routine-credits "RTN","SAMIUR",17,0) ;@primary-dev George P. Lilly (gpl) "RTN","SAMIUR",18,0) ; gpl@vistaexpertise.net "RTN","SAMIUR",19,0) ;@primary-dev-org Vista Expertise Network (ven) "RTN","SAMIUR",20,0) ; http://vistaexpertise.net "RTN","SAMIUR",21,0) ;@copyright 2017/2021, gpl, all rights reserved "RTN","SAMIUR",22,0) ;@license see routine SAMIUL "RTN","SAMIUR",23,0) ; "RTN","SAMIUR",24,0) ;@last-updated 2021-07-12t23:19z "RTN","SAMIUR",25,0) ;@application Screening Applications Management (SAM) "RTN","SAMIUR",26,0) ;@module Screening Applications Management - IELCAP (SAMI) "RTN","SAMIUR",27,0) ;@suite-of-files SAMI Forms (311.101-311.199) "RTN","SAMIUR",28,0) ;@version 1.18.0.12-t3+i12 "RTN","SAMIUR",29,0) ;@release-date 2020-01 "RTN","SAMIUR",30,0) ;@patch-list **5,10,11,12** "RTN","SAMIUR",31,0) ; "RTN","SAMIUR",32,0) ;@additional-dev Frederick D. S. Marshall (toad) "RTN","SAMIUR",33,0) ; toad@vistaexpertise.net "RTN","SAMIUR",34,0) ;@additional-dev Larry G. Carlson (lgc) "RTN","SAMIUR",35,0) ; larry.g.carlson@gmail.com "RTN","SAMIUR",36,0) ;@additional-dev Alexis R. Carlson (arc) "RTN","SAMIUR",37,0) ; whatisthehumanspirit@gmail.com "RTN","SAMIUR",38,0) ;@additional-dev Kenneth McGlothlen (mcglk) "RTN","SAMIUR",39,0) ; mcglk@vistaexpertise.net "RTN","SAMIUR",40,0) ; "RTN","SAMIUR",41,0) ;@module-credits see SAMIHUL "RTN","SAMIUR",42,0) ; "RTN","SAMIUR",43,0) ;@module-log repo github.com:VA-PALS-ELCAP/SAMI-VAPALS-ELCAP.git "RTN","SAMIUR",44,0) ; see SAMIURUL "RTN","SAMIUR",45,0) ; "RTN","SAMIUR",46,0) ;@contents "RTN","SAMIUR",47,0) ; WSREPORT generate report based on params in filter "RTN","SAMIUR",48,0) ; SORT sort patients by name "RTN","SAMIUR",49,0) ; NUHREF create nuhref link to casereview for all patients "RTN","SAMIUR",50,0) ; PNAME page name for report "RTN","SAMIUR",51,0) ; "RTN","SAMIUR",52,0) ; SELECT select patients for report "RTN","SAMIUR",53,0) ; UNMAT build unmatched persons list "RTN","SAMIUR",54,0) ; WKLIST build work list "RTN","SAMIUR",55,0) ; "RTN","SAMIUR",56,0) ; "RTN","SAMIUR",57,0) ; "RTN","SAMIUR",58,0) ;@section 1 wsreport subroutines "RTN","SAMIUR",59,0) ; "RTN","SAMIUR",60,0) ; "RTN","SAMIUR",61,0) ; "RTN","SAMIUR",62,0) WSREPORT(SAMIRTN,filter) ; generate report based on params in filter "RTN","SAMIUR",63,0) ; "RTN","SAMIUR",64,0) ;@called-by "RTN","SAMIUR",65,0) ; WSVAPALS^SAMIHOM4 "RTN","SAMIUR",66,0) ; WSREPORT^SAMIUR1 "RTN","SAMIUR",67,0) ;@calls "RTN","SAMIUR",68,0) ; GETHOME^SAMIHOM3 "RTN","SAMIUR",69,0) ; getThis^%wd "RTN","SAMIUR",70,0) ; SELECT "RTN","SAMIUR",71,0) ; LOAD^SAMIFORM "RTN","SAMIUR",72,0) ; $$PNAME "RTN","SAMIUR",73,0) ; findReplace^%ts "RTN","SAMIUR",74,0) ; RPTTBL^SAMIUR2 "RTN","SAMIUR",75,0) ; NUHREF "RTN","SAMIUR",76,0) ; SORT "RTN","SAMIUR",77,0) ; @RPT(ir,"routine"): [from report def table from RPTTBL^SAMIUR2] "RTN","SAMIUR",78,0) ; format = $$<tag>^SAMIUR2, where tag = "RTN","SAMIUR",79,0) ; AGE BLINEDT CONTACT CTPROT DOB FUDATE GENDER "RTN","SAMIUR",80,0) ; IFORM LASTEXM MANPAT MATCH NAME PACKYRS POSSIBLE "RTN","SAMIUR",81,0) ; RECOM RURAL SID SMHIS SMKSTAT SSN STUDYDT "RTN","SAMIUR",82,0) ; STUDYTYP VALS WHEN WORKPAT "RTN","SAMIUR",83,0) ; "RTN","SAMIUR",84,0) ; here are the user reports that are defined: "RTN","SAMIUR",85,0) ; 1. followup "RTN","SAMIUR",86,0) ; 2. activity "RTN","SAMIUR",87,0) ; 3. missingct "RTN","SAMIUR",88,0) ; 4. incomplete "RTN","SAMIUR",89,0) ; 5. outreach "RTN","SAMIUR",90,0) ; 6. enrollment "RTN","SAMIUR",91,0) ; 7. worklist "RTN","SAMIUR",92,0) ; the report to generate is passed in parameter samireporttype "RTN","SAMIUR",93,0) ; "RTN","SAMIUR",94,0) new debug set debug=0 "RTN","SAMIUR",95,0) if $get(filter("debug"))=1 set debug=1 "RTN","SAMIUR",96,0) if $get(filter("debug"))=1 set debug=1 "RTN","SAMIUR",97,0) kill SAMIRTN "RTN","SAMIUR",98,0) set HTTPRSP("mime")="text/html" "RTN","SAMIUR",99,0) ; "RTN","SAMIUR",100,0) new type,temp,site "RTN","SAMIUR",101,0) s site=$g(filter("siteid")) "RTN","SAMIUR",102,0) i site="" s site=$g(filter("site")) "RTN","SAMIUR",103,0) i site="" d q ; report site missing "RTN","SAMIUR",104,0) . d GETHOME^SAMIHOM3(.SAMIRTN,.filter) ; send them to home "RTN","SAMIUR",105,0) ; "RTN","SAMIUR",106,0) set type=$get(filter("samireporttype")) "RTN","SAMIUR",107,0) if type="" do quit ; report type missing "RTN","SAMIUR",108,0) . do GETHOME^SAMIHOM3(.SAMIRTN,.filter) ; send them to home "RTN","SAMIUR",109,0) . quit "RTN","SAMIUR",110,0) ; "RTN","SAMIUR",111,0) if type="unmatched" i $$GET1PARM^SAMIPARM("matchingReportEnabled",site)'="true" do quit ; "RTN","SAMIUR",112,0) . d GETHOME^SAMIHOM3(.SAMIRTN,.filter) ; send them to home "RTN","SAMIUR",113,0) ; "RTN","SAMIUR",114,0) do getThis^%wd("temp","table.html") ; page template "RTN","SAMIUR",115,0) quit:'$data(temp) "RTN","SAMIUR",116,0) ; "RTN","SAMIUR",117,0) new SAMIPATS "RTN","SAMIUR",118,0) ; set pats="" "RTN","SAMIUR",119,0) new datephrase "RTN","SAMIUR",120,0) do SELECT(.SAMIPATS,type,.datephrase,.filter) ; select pats for report "RTN","SAMIUR",121,0) ; quit:'$data(SAMIPATS) "RTN","SAMIUR",122,0) ; "RTN","SAMIUR",123,0) new ln,cnt,ii "RTN","SAMIUR",124,0) set (ii,ln,cnt)=0 "RTN","SAMIUR",125,0) for do quit:'ii quit:$get(temp(ii))["<thead" "RTN","SAMIUR",126,0) . set ii=$order(temp(ii)) "RTN","SAMIUR",127,0) . quit:'ii "RTN","SAMIUR",128,0) . quit:$get(temp(ii))["<thead" "RTN","SAMIUR",129,0) . ; "RTN","SAMIUR",130,0) . set cnt=cnt+1 "RTN","SAMIUR",131,0) . set ln=$get(temp(ii)) "RTN","SAMIUR",132,0) . new samikey,si "RTN","SAMIUR",133,0) . set (samikey,si)="" "RTN","SAMIUR",134,0) . do LOAD^SAMIFORM(.ln,samikey,si,.filter) "RTN","SAMIUR",135,0) . ; if ln["PAGE NAME" do "RTN","SAMIUR",136,0) . ; . do findReplace^%ts(.ln,"PAGE NAME",$$PNAME(type,datephrase)) "RTN","SAMIUR",137,0) . ; . quit "RTN","SAMIUR",138,0) . if ln["PAGE NAME" do "RTN","SAMIUR",139,0) . . do findReplace^%ts(.ln,"PAGE NAME",$$PNAME(type,"")) "RTN","SAMIUR",140,0) . . quit "RTN","SAMIUR",141,0) . if ln["CRITERIA" do "RTN","SAMIUR",142,0) . . do findReplace^%ts(.ln,"CRITERIA",datephrase) "RTN","SAMIUR",143,0) . . quit "RTN","SAMIUR",144,0) . if ln["@@REPORTTYPE@@" do "RTN","SAMIUR",145,0) . . do findReplace^%ts(.ln,"@@REPORTTYPE@@",type) "RTN","SAMIUR",146,0) . . quit "RTN","SAMIUR",147,0) . ; "RTN","SAMIUR",148,0) . if ln["name=""start-date""" do "RTN","SAMIUR",149,0) . . do findReplace^%ts(.ln,"start-date""","start-date"" value="""_$g(filter("start-date"))_"""") "RTN","SAMIUR",150,0) . . quit "RTN","SAMIUR",151,0) . if ln["name=""end-date""" do "RTN","SAMIUR",152,0) . . do findReplace^%ts(.ln,"end-date""","end-date"" value="""_$g(filter("end-date"))_"""") "RTN","SAMIUR",153,0) . . quit "RTN","SAMIUR",154,0) . ; "RTN","SAMIUR",155,0) . set SAMIRTN(cnt)=ln "RTN","SAMIUR",156,0) . quit "RTN","SAMIUR",157,0) ; "RTN","SAMIUR",158,0) new RPT,ik "RTN","SAMIUR",159,0) do RPTTBL^SAMIUR2(.RPT,type,site) ; load report definition table "RTN","SAMIUR",160,0) if '$data(RPT) do quit ; don't know about this report "RTN","SAMIUR",161,0) . do GETHOME^SAMIHOM3(.SAMIRTN,.filter) ; send them to home "RTN","SAMIUR",162,0) . quit "RTN","SAMIUR",163,0) ; "RTN","SAMIUR",164,0) ; output header "RTN","SAMIUR",165,0) ; "RTN","SAMIUR",166,0) set cnt=cnt+1 set SAMIRTN(cnt)="<thead><tr>" "RTN","SAMIUR",167,0) set cnt=cnt+1 "RTN","SAMIUR",168,0) new totcnt set totcnt=cnt "RTN","SAMIUR",169,0) ; "RTN","SAMIUR",170,0) set ir="" "RTN","SAMIUR",171,0) for do quit:ir="" ; "RTN","SAMIUR",172,0) . set ir=$order(RPT(ir)) "RTN","SAMIUR",173,0) . quit:ir="" "RTN","SAMIUR",174,0) . set cnt=cnt+1 "RTN","SAMIUR",175,0) . set SAMIRTN(cnt)="<th>"_$get(RPT(ir,"header"))_"</th>" "RTN","SAMIUR",176,0) . quit "RTN","SAMIUR",177,0) ; "RTN","SAMIUR",178,0) set cnt=cnt+1 set SAMIRTN(cnt)="</tr></thead>" "RTN","SAMIUR",179,0) ; "RTN","SAMIUR",180,0) set cnt=cnt+1 set SAMIRTN(cnt)="<tbody>" "RTN","SAMIUR",181,0) ; "RTN","SAMIUR",182,0) if type'="worklist" do ; "RTN","SAMIUR",183,0) . do NUHREF(.SAMIPATS) ; create the nuhref link for all patients "RTN","SAMIUR",184,0) . quit "RTN","SAMIUR",185,0) ; "RTN","SAMIUR",186,0) new SRT set SRT="" "RTN","SAMIUR",187,0) if $get(filter("sort"))="" d ; what kind of sort "RTN","SAMIUR",188,0) . set filter("sort")="name" "RTN","SAMIUR",189,0) . i type="missingct" s filter("sort")="cdate" ;sort by latest contact "RTN","SAMIUR",190,0) do SORT(.SRT,.SAMIPATS,.filter) "RTN","SAMIUR",191,0) ; zwrite SRT "RTN","SAMIUR",192,0) ; "RTN","SAMIUR",193,0) ; set ij=0 "RTN","SAMIUR",194,0) ; for do quit:'ij ; "RTN","SAMIUR",195,0) ; . set ij=$order(SAMIPATS(ij)) "RTN","SAMIUR",196,0) ; . quit:'ij "RTN","SAMIUR",197,0) ; . new ij2 set ij2=0 "RTN","SAMIUR",198,0) ; . for do quit:'ij2 ; "RTN","SAMIUR",199,0) ; . . set ij2=$order(SAMIPATS(ij,ij2)) "RTN","SAMIUR",200,0) ; . . quit:'ij2 "RTN","SAMIUR",201,0) ; . . new dfn set dfn=ij2 "RTN","SAMIUR",202,0) ; . . quit "RTN","SAMIUR",203,0) ; . quit "RTN","SAMIUR",204,0) ; "RTN","SAMIUR",205,0) new iz,ij,ij2,dfn,rows "RTN","SAMIUR",206,0) set rows=0 "RTN","SAMIUR",207,0) set (iz,ij,ij2,dfn)="" "RTN","SAMIUR",208,0) for do quit:iz="" ; "RTN","SAMIUR",209,0) . set iz=$order(SRT(iz)) "RTN","SAMIUR",210,0) . quit:iz="" "RTN","SAMIUR",211,0) . set ij=$order(SRT(iz,"")) "RTN","SAMIUR",212,0) . set dfn=$order(SRT(iz,ij,"")) "RTN","SAMIUR",213,0) . do ; "RTN","SAMIUR",214,0) . . set cnt=cnt+1 set SAMIRTN(cnt)="<tr>" "RTN","SAMIUR",215,0) . . set ir="" "RTN","SAMIUR",216,0) . . for do quit:ir="" ; "RTN","SAMIUR",217,0) . . . set ir=$order(RPT(ir)) "RTN","SAMIUR",218,0) . . . quit:ir="" "RTN","SAMIUR",219,0) . . . set cnt=cnt+1 "RTN","SAMIUR",220,0) . . . new XR,XRV "RTN","SAMIUR",221,0) . . . ; set XR=$get(RPT(ir,"routine"))_"("_ij_",.SAMIPATS)" "RTN","SAMIUR",222,0) . . . set XR="set XRV="_$get(RPT(ir,"routine"))_"("_ij_","_dfn_",.SAMIPATS)" "RTN","SAMIUR",223,0) . . . ; set XRV=@XR "RTN","SAMIUR",224,0) . . . xecute XR ; call report-field handlers in ^SAMIUR2 "RTN","SAMIUR",225,0) . . . set SAMIRTN(cnt)="<td>"_$get(XRV)_"</td>" "RTN","SAMIUR",226,0) . . . quit "RTN","SAMIUR",227,0) . . ; "RTN","SAMIUR",228,0) . . set cnt=cnt+1 "RTN","SAMIUR",229,0) . . set SAMIRTN(cnt)="</tr>"_$CHAR(10,13) "RTN","SAMIUR",230,0) . . set rows=rows+1 "RTN","SAMIUR",231,0) . . quit "RTN","SAMIUR",232,0) . quit "RTN","SAMIUR",233,0) ; "RTN","SAMIUR",234,0) set cnt=cnt+1 "RTN","SAMIUR",235,0) set SAMIRTN(cnt)="<tr><td>Total: "_rows_"</td></tr>" "RTN","SAMIUR",236,0) set SAMIRTN(totcnt)="<td>Total: "_rows_"</td></tr><tr>" "RTN","SAMIUR",237,0) ; "RTN","SAMIUR",238,0) set cnt=cnt+1 set SAMIRTN(cnt)="</tbody>" "RTN","SAMIUR",239,0) for do quit:temp(ii)["</tbody>" ; "RTN","SAMIUR",240,0) . set ii=$order(temp(ii)) "RTN","SAMIUR",241,0) . quit:temp(ii)["</tbody>" "RTN","SAMIUR",242,0) . ; skip past template headers & blank body "RTN","SAMIUR",243,0) . quit "RTN","SAMIUR",244,0) ; "RTN","SAMIUR",245,0) for do quit:'ii ; "RTN","SAMIUR",246,0) . set ii=$order(temp(ii)) "RTN","SAMIUR",247,0) . quit:'ii "RTN","SAMIUR",248,0) . set cnt=cnt+1 "RTN","SAMIUR",249,0) . set ln=$get(temp(ii)) "RTN","SAMIUR",250,0) . new samikey,si "RTN","SAMIUR",251,0) . set (samikey,si)="" "RTN","SAMIUR",252,0) . do LOAD^SAMIFORM(.ln,samikey,si,.filter) "RTN","SAMIUR",253,0) . set SAMIRTN(cnt)=ln "RTN","SAMIUR",254,0) . quit "RTN","SAMIUR",255,0) ; "RTN","SAMIUR",256,0) quit ; end of WSREPORT "RTN","SAMIUR",257,0) ; "RTN","SAMIUR",258,0) ; "RTN","SAMIUR",259,0) SORT(SRTN,SAMIPATS,FILTER) ; sort patients by name "RTN","SAMIUR",260,0) ; "RTN","SAMIUR",261,0) ;@called-by "RTN","SAMIUR",262,0) ; WSREPORT "RTN","SAMIUR",263,0) ;@calls "RTN","SAMIUR",264,0) ; $$UPCASE^XLFMSMT "RTN","SAMIUR",265,0) ; "RTN","SAMIUR",266,0) new typ set typ=$get(FILTER("sort")) "RTN","SAMIUR",267,0) ; "RTN","SAMIUR",268,0) if typ="" set typ="name" "RTN","SAMIUR",269,0) new iz,dt,dfn,nm,cdate "RTN","SAMIUR",270,0) set (dt,dfn,nm)="" ; note: should dfn be initialized inside loop? "RTN","SAMIUR",271,0) set iz=0 "RTN","SAMIUR",272,0) ; "RTN","SAMIUR",273,0) new indx "RTN","SAMIUR",274,0) for do quit:'dt ; "RTN","SAMIUR",275,0) . set dt=$order(SAMIPATS(dt)) "RTN","SAMIUR",276,0) . quit:'dt "RTN","SAMIUR",277,0) . ; note: dfn not re-initialized to "" here; should it be? "RTN","SAMIUR",278,0) . for do quit:'dfn ; "RTN","SAMIUR",279,0) . . set dfn=$order(SAMIPATS(dt,dfn)) "RTN","SAMIUR",280,0) . . quit:'dfn "RTN","SAMIUR",281,0) . . if typ="name" do ; "RTN","SAMIUR",282,0) . . . set nm=$get(SAMIPATS(dt,dfn,"name")) "RTN","SAMIUR",283,0) . . . set nm=$$UPCASE^XLFMSMT(nm) "RTN","SAMIUR",284,0) . . . if nm="" set nm=" " "RTN","SAMIUR",285,0) . . . set indx(nm,dt,dfn)="" "RTN","SAMIUR",286,0) . . . quit "RTN","SAMIUR",287,0) . . if typ="cdate" do ; "RTN","SAMIUR",288,0) . . . set cdate=$$LDOC^SAMIUR2(dt,dfn,.SAMIPATS) "RTN","SAMIUR",289,0) . . . set cdate=$$FMDT^SAMIUR2(cdate) "RTN","SAMIUR",290,0) . . . set indx(cdate,dt,dfn)="" "RTN","SAMIUR",291,0) . . quit "RTN","SAMIUR",292,0) . quit "RTN","SAMIUR",293,0) ; "RTN","SAMIUR",294,0) new iiz set iiz="" "RTN","SAMIUR",295,0) set (dt,dfn)="" ; note: here, too, should inits be inside loops? "RTN","SAMIUR",296,0) for do quit:iiz="" ; "RTN","SAMIUR",297,0) . set iiz=$order(indx(iiz)) "RTN","SAMIUR",298,0) . quit:iiz="" "RTN","SAMIUR",299,0) . for do quit:dt="" ; "RTN","SAMIUR",300,0) . . set dt=$order(indx(iiz,dt)) "RTN","SAMIUR",301,0) . . quit:dt="" "RTN","SAMIUR",302,0) . . for do quit:dfn="" ; "RTN","SAMIUR",303,0) . . . set dfn=$order(indx(iiz,dt,dfn)) "RTN","SAMIUR",304,0) . . . quit:dfn="" "RTN","SAMIUR",305,0) . . . set iz=iz+1 "RTN","SAMIUR",306,0) . . . set SRTN(iz,dt,dfn)=iiz "RTN","SAMIUR",307,0) . . . quit "RTN","SAMIUR",308,0) . . quit "RTN","SAMIUR",309,0) . quit "RTN","SAMIUR",310,0) ; "RTN","SAMIUR",311,0) quit ; end of SORT "RTN","SAMIUR",312,0) ; "RTN","SAMIUR",313,0) ; "RTN","SAMIUR",314,0) ; "RTN","SAMIUR",315,0) NUHREF(SAMIPATS) ; create nuhref link to casereview for all patients "RTN","SAMIUR",316,0) ; "RTN","SAMIUR",317,0) ;@called-by "RTN","SAMIUR",318,0) ; WSREPORT "RTN","SAMIUR",319,0) ;@calls "RTN","SAMIUR",320,0) ; $$setroot^%wd "RTN","SAMIUR",321,0) ; $$GETSSN^SAMIFORM "RTN","SAMIUR",322,0) ; "RTN","SAMIUR",323,0) new ij "RTN","SAMIUR",324,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIUR",325,0) set ij=0 "RTN","SAMIUR",326,0) for do quit:'ij ; "RTN","SAMIUR",327,0) . set ij=$order(SAMIPATS(ij)) "RTN","SAMIUR",328,0) . quit:'ij "RTN","SAMIUR",329,0) . new ij2 set ij2=0 "RTN","SAMIUR",330,0) . for do quit:'ij2 ; "RTN","SAMIUR",331,0) . . set ij2=$order(SAMIPATS(ij,ij2)) "RTN","SAMIUR",332,0) . . quit:'ij2 "RTN","SAMIUR",333,0) . . ; "RTN","SAMIUR",334,0) . . new dfn set dfn=ij2 "RTN","SAMIUR",335,0) . . set SAMIPATS(ij,dfn,"sid")=$get(@root@(dfn,"samistudyid")) "RTN","SAMIUR",336,0) . . set SAMIPATS(ij,dfn,"name")=$get(@root@(dfn,"saminame")) "RTN","SAMIUR",337,0) . . ; "RTN","SAMIUR",338,0) . . new sid set sid=SAMIPATS(ij,dfn,"sid") "RTN","SAMIUR",339,0) . . set SAMIPATS(ij,dfn,"ssn")=$$GETSSN^SAMIFORM(sid) "RTN","SAMIUR",340,0) . . new name set name=SAMIPATS(ij,dfn,"name") "RTN","SAMIUR",341,0) . . ; "RTN","SAMIUR",342,0) . . new nuhref set nuhref="<form method=POST action=""/vapals"">" "RTN","SAMIUR",343,0) . . set nuhref=nuhref_"<input type=hidden name=""samiroute"" value=""casereview"">" "RTN","SAMIUR",344,0) . . set nuhref=nuhref_"<input type=hidden name=""studyid"" value="_sid_">" "RTN","SAMIUR",345,0) . . set nuhref=nuhref_"<input value="""_name_""" class=""btn btn-link"" role=""link"" type=""submit""></form>" "RTN","SAMIUR",346,0) . . set SAMIPATS(ij,dfn,"nuhref")=nuhref "RTN","SAMIUR",347,0) . . quit "RTN","SAMIUR",348,0) . quit "RTN","SAMIUR",349,0) ; "RTN","SAMIUR",350,0) quit ; end of NUHREF "RTN","SAMIUR",351,0) ; "RTN","SAMIUR",352,0) ; "RTN","SAMIUR",353,0) ; "RTN","SAMIUR",354,0) PNAME(type,phrase) ; page name for report "RTN","SAMIUR",355,0) ; "RTN","SAMIUR",356,0) ;@called-by "RTN","SAMIUR",357,0) ; WSREPORT "RTN","SAMIUR",358,0) ;@calls none "RTN","SAMIUR",359,0) ; "RTN","SAMIUR",360,0) ; extrinsic returns the PAGE NAME for the report "RTN","SAMIUR",361,0) ; "RTN","SAMIUR",362,0) ; if type="followup" quit "Followup next 30 days -"_$get(phrase) "RTN","SAMIUR",363,0) if type="followup" quit "Followup "_$get(phrase) "RTN","SAMIUR",364,0) ; if type="activity" quit "Activity last 30 days -"_$get(phrase) "RTN","SAMIUR",365,0) if type="activity" quit "Activity "_$get(phrase) "RTN","SAMIUR",366,0) if type="missingct" quit "Intake but no CT Evaluation"_$get(phrase) "RTN","SAMIUR",367,0) if type="incomplete" quit "Incomplete Forms"_$get(phrase) "RTN","SAMIUR",368,0) if type="outreach" quit "Outreach"_$get(phrase) "RTN","SAMIUR",369,0) if type="enrollment" quit "Enrollment"_$get(phrase) "RTN","SAMIUR",370,0) if type="inactive" quit "Inactive"_$get(phrase) "RTN","SAMIUR",371,0) ; "RTN","SAMIUR",372,0) quit "" ; end of $$PNAME "RTN","SAMIUR",373,0) ; "RTN","SAMIUR",374,0) ; "RTN","SAMIUR",375,0) ; "RTN","SAMIUR",376,0) ;@section 2 select subroutines "RTN","SAMIUR",377,0) ; "RTN","SAMIUR",378,0) ; "RTN","SAMIUR",379,0) ; "RTN","SAMIUR",380,0) SELECT(SAMIPATS,ztype,datephrase,filter) ; select patients for report "RTN","SAMIUR",381,0) ; "RTN","SAMIUR",382,0) ;@called-by "RTN","SAMIUR",383,0) ; WSREPORT "RTN","SAMIUR",384,0) ;@calls "RTN","SAMIUR",385,0) ; UNMAT "RTN","SAMIUR",386,0) ; WKLIST "RTN","SAMIUR",387,0) ; $$KEY2FM^SAMICASE "RTN","SAMIUR",388,0) ; $$NOW^XLFDT "RTN","SAMIUR",389,0) ; $$FMADD^XLFDT "RTN","SAMIUR",390,0) ; $$VAPALSDT^SAMICASE "RTN","SAMIUR",391,0) ; $$setroot^%wd "RTN","SAMIUR",392,0) ; GETITEMS^SAMICASE "RTN","SAMIUR",393,0) ; "RTN","SAMIUR",394,0) ; merge ^gpl("select")=filter "RTN","SAMIUR",395,0) new type set type=ztype "RTN","SAMIUR",396,0) if type="unmatched" do quit ; "RTN","SAMIUR",397,0) . do UNMAT(.SAMIPATS,ztype,.datephrase,.filter) "RTN","SAMIUR",398,0) . quit "RTN","SAMIUR",399,0) if type="worklist" do quit ; "RTN","SAMIUR",400,0) . do WKLIST(.SAMIPATS,ztype,.datephrase,.filter) "RTN","SAMIUR",401,0) . quit "RTN","SAMIUR",402,0) if $get(type)="" set type="enrollment" "RTN","SAMIUR",403,0) if type="cumpy" set type="enrollment" "RTN","SAMIUR",404,0) new site set site=$get(filter("siteid")) "RTN","SAMIUR",405,0) ; "RTN","SAMIUR",406,0) new strdt,enddt,fmstrdt,fmenddt "RTN","SAMIUR",407,0) set strdt=$get(filter("start-date")) "RTN","SAMIUR",408,0) set fmstrdt=$$KEY2FM^SAMICASE(strdt) "RTN","SAMIUR",409,0) if fmstrdt=-1 do ; "RTN","SAMIUR",410,0) . set fmstrdt=2000101 "RTN","SAMIUR",411,0) . if type="followup" set fmstrdt=$$NOW^XLFDT "RTN","SAMIUR",412,0) . if type="activity" set fmstrdt=$$FMADD^XLFDT($$NOW^XLFDT,-31) "RTN","SAMIUR",413,0) . quit "RTN","SAMIUR",414,0) if strdt="" set filter("start-date")=$$VAPALSDT^SAMICASE(fmstrdt) "RTN","SAMIUR",415,0) ; "RTN","SAMIUR",416,0) set enddt=$get(filter("end-date")) "RTN","SAMIUR",417,0) set fmenddt=$$KEY2FM^SAMICASE(enddt) "RTN","SAMIUR",418,0) if fmenddt=-1 do ; "RTN","SAMIUR",419,0) . set fmenddt=$$NOW^XLFDT "RTN","SAMIUR",420,0) . if type="followup" set fmenddt=$$FMADD^XLFDT($$NOW^XLFDT,31) "RTN","SAMIUR",421,0) . quit "RTN","SAMIUR",422,0) if enddt="" set filter("end-date")=$$VAPALSDT^SAMICASE(fmenddt) "RTN","SAMIUR",423,0) ; "RTN","SAMIUR",424,0) set datephrase="" "RTN","SAMIUR",425,0) new zi set zi=0 "RTN","SAMIUR",426,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIUR",427,0) ; "RTN","SAMIUR",428,0) for do quit:'zi ; "RTN","SAMIUR",429,0) . set zi=$order(@root@(zi)) "RTN","SAMIUR",430,0) . quit:'zi "RTN","SAMIUR",431,0) . ; "RTN","SAMIUR",432,0) . new sid set sid=$get(@root@(zi,"samistudyid")) "RTN","SAMIUR",433,0) . quit:sid="" "RTN","SAMIUR",434,0) . quit:$extract(sid,1,3)'=site "RTN","SAMIUR",435,0) . ; "RTN","SAMIUR",436,0) . new items set items="" "RTN","SAMIUR",437,0) . do GETITEMS^SAMICASE("items",sid) "RTN","SAMIUR",438,0) . quit:'$data(items) "RTN","SAMIUR",439,0) . ; "RTN","SAMIUR",440,0) . new efmdate,edate,siform,ceform,cefud,fmcefud,cedos,fmcedos "RTN","SAMIUR",441,0) . set siform=$order(items("siform-")) "RTN","SAMIUR",442,0) . new status set status=$get(@root@("graph",sid,siform,"sistatus")) "RTN","SAMIUR",443,0) . if type="inactive",status="active" quit ; for inactive report "RTN","SAMIUR",444,0) . if type'="inactive",status'="active" quit ; for other reports "RTN","SAMIUR",445,0) . ; "RTN","SAMIUR",446,0) . set ceform=$order(items("ceform-a"),-1) "RTN","SAMIUR",447,0) . set (cefud,fmcefud,cedos,fmcedos)="" "RTN","SAMIUR",448,0) . if ceform'="" do ; "RTN","SAMIUR",449,0) . . set cefud=$get(@root@("graph",sid,ceform,"cefud")) "RTN","SAMIUR",450,0) . . if cefud'="" set fmcefud=$$KEY2FM^SAMICASE(cefud) "RTN","SAMIUR",451,0) . . set cedos=$get(@root@("graph",sid,ceform,"cedos")) "RTN","SAMIUR",452,0) . . if cedos'="" set fmcedos=$$KEY2FM^SAMICASE(cedos) "RTN","SAMIUR",453,0) . . quit "RTN","SAMIUR",454,0) . ; "RTN","SAMIUR",455,0) . set edate=$get(@root@("graph",sid,siform,"sidc")) "RTN","SAMIUR",456,0) . if edate="" set edate=$get(@root@("graph",sid,siform,"samicreatedate")) "RTN","SAMIUR",457,0) . set efmdate=$$KEY2FM^SAMICASE(edate) "RTN","SAMIUR",458,0) . set edate=$$VAPALSDT^SAMICASE(efmdate) "RTN","SAMIUR",459,0) . ; "RTN","SAMIUR",460,0) . ; "RTN","SAMIUR",461,0) . if type="followup" do ; "RTN","SAMIUR",462,0) . . ; new nplus30 set nplus30=$$FMADD^XLFDT($$NOW^XLFDT,31) "RTN","SAMIUR",463,0) . . if +fmcefud<fmstrdt quit ; before start date "RTN","SAMIUR",464,0) . . if +fmcefud<(fmenddt+1) do ; before end date "RTN","SAMIUR",465,0) . . . quit:ceform="" ; no ct eval so no followup date "RTN","SAMIUR",466,0) . . . set SAMIPATS(fmcefud,zi,"edate")=edate "RTN","SAMIUR",467,0) . . . set SAMIPATS(fmcefud,zi)="" "RTN","SAMIUR",468,0) . . . if ceform="" set cefud="baseline" "RTN","SAMIUR",469,0) . . . set SAMIPATS(fmcefud,zi,"cefud")=cefud "RTN","SAMIUR",470,0) . . . set SAMIPATS(fmcefud,zi,"cedos")=cedos "RTN","SAMIUR",471,0) . . . set SAMIPATS(fmcefud,zi,"ceform")=ceform "RTN","SAMIUR",472,0) . . . set SAMIPATS(fmcefud,zi,"ceform-vals")=$name(@root@("graph",sid,ceform)) "RTN","SAMIUR",473,0) . . . set SAMIPATS(fmcefud,zi,"siform")=siform "RTN","SAMIUR",474,0) . . . set SAMIPATS(fmcefud,zi,"siform-vals")=$name(@root@("graph",sid,siform)) "RTN","SAMIUR",475,0) . . . merge SAMIPATS(fmcefud,zi,"items")=items "RTN","SAMIUR",476,0) . . . quit "RTN","SAMIUR",477,0) . . set datephrase=" before "_$$VAPALSDT^SAMICASE(fmenddt) "RTN","SAMIUR",478,0) . . quit "RTN","SAMIUR",479,0) . ; "RTN","SAMIUR",480,0) . if type="activity" do ; "RTN","SAMIUR",481,0) . . ; new nminus30 set nminus30=$$FMADD^XLFDT($$NOW^XLFDT,-31) "RTN","SAMIUR",482,0) . . new anyform set anyform=$order(items("sort",""),-1) "RTN","SAMIUR",483,0) . . new fmanyform set fmanyform=$$KEY2FM^SAMICASE(anyform) "RTN","SAMIUR",484,0) . . if fmanyform<fmstrdt quit ; before the start date "RTN","SAMIUR",485,0) . . ; if fmanyform<(fmenddt+1)!(efmdate>fmenddt) do ; need any new form "RTN","SAMIUR",486,0) . . if fmanyform<(fmenddt+1) do ; "RTN","SAMIUR",487,0) . . . set SAMIPATS(efmdate,zi,"edate")=edate "RTN","SAMIUR",488,0) . . . set SAMIPATS(efmdate,zi)="" "RTN","SAMIUR",489,0) . . . if ceform="" set cefud="baseline" "RTN","SAMIUR",490,0) . . . set SAMIPATS(efmdate,zi,"cefud")=cefud "RTN","SAMIUR",491,0) . . . set SAMIPATS(efmdate,zi,"cedos")=cedos "RTN","SAMIUR",492,0) . . . set SAMIPATS(efmdate,zi,"ceform")=ceform "RTN","SAMIUR",493,0) . . . set SAMIPATS(efmdate,zi,"siform")=siform "RTN","SAMIUR",494,0) . . . merge SAMIPATS(efmdate,zi,"items")=items "RTN","SAMIUR",495,0) . . . quit "RTN","SAMIUR",496,0) . . set datephrase=" after "_$$VAPALSDT^SAMICASE(fmstrdt) "RTN","SAMIUR",497,0) . . quit "RTN","SAMIUR",498,0) . ; "RTN","SAMIUR",499,0) . ; date filter for all the rest of the reports "RTN","SAMIUR",500,0) . ; "RTN","SAMIUR",501,0) . quit:efmdate<fmstrdt ; before the start date "RTN","SAMIUR",502,0) . quit:efmdate>(fmenddt+1) ; after the end date "RTN","SAMIUR",503,0) . ; "RTN","SAMIUR",504,0) . if type="incomplete" do ; "RTN","SAMIUR",505,0) . . new complete set complete=1 "RTN","SAMIUR",506,0) . . new zj set zj="" "RTN","SAMIUR",507,0) . . new gr set gr=$name(@root@("graph",sid)) "RTN","SAMIUR",508,0) . . for do quit:zj="" ; "RTN","SAMIUR",509,0) . . . set zj=$order(@gr@(zj)) "RTN","SAMIUR",510,0) . . . quit:zj="" "RTN","SAMIUR",511,0) . . . if $get(@gr@(zj,"samistatus"))="incomplete" do ; "RTN","SAMIUR",512,0) . . . . set complete=0 "RTN","SAMIUR",513,0) . . . . set SAMIPATS(efmdate,zi,"iform")=$get(SAMIPATS(efmdate,zi,"iform"))_" "_zj "RTN","SAMIUR",514,0) . . . . quit "RTN","SAMIUR",515,0) . . . quit "RTN","SAMIUR",516,0) . . ; "RTN","SAMIUR",517,0) . . if complete=0 do ; has incomplete form(s) "RTN","SAMIUR",518,0) . . . set SAMIPATS(efmdate,zi,"edate")=edate "RTN","SAMIUR",519,0) . . . set SAMIPATS(efmdate,zi)="" "RTN","SAMIUR",520,0) . . . if ceform="" set cefud="baseline" "RTN","SAMIUR",521,0) . . . set SAMIPATS(efmdate,zi,"cefud")=cefud "RTN","SAMIUR",522,0) . . . set SAMIPATS(efmdate,zi,"ceform")=ceform "RTN","SAMIUR",523,0) . . . set SAMIPATS(efmdate,zi,"siform")=siform "RTN","SAMIUR",524,0) . . . merge SAMIPATS(efmdate,zi,"items")=items "RTN","SAMIUR",525,0) . . . quit "RTN","SAMIUR",526,0) . . set datephrase="" "RTN","SAMIUR",527,0) . . quit "RTN","SAMIUR",528,0) . ; "RTN","SAMIUR",529,0) . if type="missingct" do ; "RTN","SAMIUR",530,0) . . if ceform="" do ; has incomplete form(s) "RTN","SAMIUR",531,0) . . . set SAMIPATS(efmdate,zi,"edate")=edate "RTN","SAMIUR",532,0) . . . set SAMIPATS(efmdate,zi)="" "RTN","SAMIUR",533,0) . . . if ceform="" set cefud="baseline" "RTN","SAMIUR",534,0) . . . set SAMIPATS(efmdate,zi,"cefud")=cefud "RTN","SAMIUR",535,0) . . . set SAMIPATS(efmdate,zi,"ceform")=ceform "RTN","SAMIUR",536,0) . . . set SAMIPATS(efmdate,zi,"siform")=siform "RTN","SAMIUR",537,0) . . . merge SAMIPATS(efmdate,zi,"items")=items "RTN","SAMIUR",538,0) . . . quit "RTN","SAMIUR",539,0) . . set datephrase="" "RTN","SAMIUR",540,0) . . quit "RTN","SAMIUR",541,0) . ; "RTN","SAMIUR",542,0) . if type="outreach" do ; no-op; hook for future development? "RTN","SAMIUR",543,0) . . quit "RTN","SAMIUR",544,0) . ; "RTN","SAMIUR",545,0) . if type="enrollment" do ; "RTN","SAMIUR",546,0) . . set SAMIPATS(efmdate,zi,"edate")=edate "RTN","SAMIUR",547,0) . . set SAMIPATS(efmdate,zi)="" "RTN","SAMIUR",548,0) . . set SAMIPATS(efmdate,zi,"cefud")=cefud "RTN","SAMIUR",549,0) . . set SAMIPATS(efmdate,zi,"ceform")=ceform "RTN","SAMIUR",550,0) . . set SAMIPATS(efmdate,zi,"cedos")=cedos "RTN","SAMIUR",551,0) . . set SAMIPATS(efmdate,zi,"siform")=siform "RTN","SAMIUR",552,0) . . merge SAMIPATS(efmdate,zi,"items")=items "RTN","SAMIUR",553,0) . . quit "RTN","SAMIUR",554,0) . ; "RTN","SAMIUR",555,0) . if type="inactive" do ; "RTN","SAMIUR",556,0) . . set SAMIPATS(efmdate,zi,"edate")=edate "RTN","SAMIUR",557,0) . . set SAMIPATS(efmdate,zi)="" "RTN","SAMIUR",558,0) . . set SAMIPATS(efmdate,zi,"cefud")=cefud "RTN","SAMIUR",559,0) . . set SAMIPATS(efmdate,zi,"ceform")=ceform "RTN","SAMIUR",560,0) . . set SAMIPATS(efmdate,zi,"cedos")=cedos "RTN","SAMIUR",561,0) . . set SAMIPATS(efmdate,zi,"siform")=siform "RTN","SAMIUR",562,0) . . merge SAMIPATS(efmdate,zi,"items")=items "RTN","SAMIUR",563,0) . . quit "RTN","SAMIUR",564,0) . ; "RTN","SAMIUR",565,0) . set datephrase=" as of "_$$VAPALSDT^SAMICASE($$NOW^XLFDT) "RTN","SAMIUR",566,0) . quit "RTN","SAMIUR",567,0) ; "RTN","SAMIUR",568,0) quit ; end of SELECT "RTN","SAMIUR",569,0) ; "RTN","SAMIUR",570,0) ; "RTN","SAMIUR",571,0) ; "RTN","SAMIUR",572,0) UNMAT(SAMIPATS,ztype,datephrase,filter) ; build unmatched persons list "RTN","SAMIUR",573,0) ; "RTN","SAMIUR",574,0) ;@called-by "RTN","SAMIUR",575,0) ; SELECT "RTN","SAMIUR",576,0) ;@calls "RTN","SAMIUR",577,0) ; $$setroot^%wd "RTN","SAMIUR",578,0) ; "RTN","SAMIUR",579,0) set datephrase="Unmatched Persons" "RTN","SAMIUR",580,0) new lroot set lroot=$$setroot^%wd("patient-lookup") "RTN","SAMIUR",581,0) new dfn set dfn=9000000 "RTN","SAMIUR",582,0) for do quit:'dfn ; "RTN","SAMIUR",583,0) . set dfn=$order(@lroot@("dfn",dfn)) "RTN","SAMIUR",584,0) . quit:'dfn "RTN","SAMIUR",585,0) . ; "RTN","SAMIUR",586,0) . new ien set ien=$order(@lroot@("dfn",dfn,"")) "RTN","SAMIUR",587,0) . quit:ien="" "RTN","SAMIUR",588,0) . n ordern "RTN","SAMIUR",589,0) . s ordern=$g(@lroot@(ien,"ORMORCordernumber")) "RTN","SAMIUR",590,0) . i ordern="" s ordern=$g(@lroot@(ien,"ORM",1,"ordernumber")) "RTN","SAMIUR",591,0) . i ordern'="" q ; "RTN","SAMIUR",592,0) . i $g(@lroot@(ien,"siteid"))'[site q ; "RTN","SAMIUR",593,0) . ;quit:$get(@lroot@(ien,"remotedfn"))'="" ; "RTN","SAMIUR",594,0) . ; "RTN","SAMIUR",595,0) . merge SAMIPATS(ien,dfn)=@lroot@(ien) "RTN","SAMIUR",596,0) . ; "RTN","SAMIUR",597,0) . new name set name=$get(SAMIPATS(ien,dfn,"saminame")) "RTN","SAMIUR",598,0) . ; new name set name=$get(SAMIPATS(ien,dfn,"sinamef")) "RTN","SAMIUR",599,0) . ; set name=name_","_SAMIPATS(ien,dfn,"sinamel") "RTN","SAMIUR",600,0) . new nuhref set nuhref="<form method=POST action=""/vapals"">" "RTN","SAMIUR",601,0) . set nuhref=nuhref_"<input type=hidden name=""samiroute"" value=""editperson"">" "RTN","SAMIUR",602,0) . set nuhref=nuhref_"<input type=hidden name=""dfn"" value="_dfn_">" "RTN","SAMIUR",603,0) . set nuhref=nuhref_"<input type=hidden name=""siteid"" value="_site_">" "RTN","SAMIUR",604,0) . set nuhref=nuhref_"<input value="""_name_""" class=""btn btn-link"" role=""link"" type=""submit""></form>" "RTN","SAMIUR",605,0) . set SAMIPATS(ien,dfn,"editref")=nuhref "RTN","SAMIUR",606,0) . quit "RTN","SAMIUR",607,0) ; "RTN","SAMIUR",608,0) quit ; end of UNMAT "RTN","SAMIUR",609,0) ; "RTN","SAMIUR",610,0) ; "RTN","SAMIUR",611,0) ; "RTN","SAMIUR",612,0) WKLIST(SAMIPATS,ztype,datephrase,filter) ; build work list "RTN","SAMIUR",613,0) ; "RTN","SAMIUR",614,0) ;@called-by "RTN","SAMIUR",615,0) ; SELECT "RTN","SAMIUR",616,0) ;@calls "RTN","SAMIUR",617,0) ; $$setroot^%wd "RTN","SAMIUR",618,0) ; "RTN","SAMIUR",619,0) ; add site "RTN","SAMIUR",620,0) ; add compare to vapals-patients "RTN","SAMIUR",621,0) ; add navigation to enrollment "RTN","SAMIUR",622,0) ; "RTN","SAMIUR",623,0) kill ^gpl("worklist") "RTN","SAMIUR",624,0) merge ^gpl("worklist")=filter "RTN","SAMIUR",625,0) new site "RTN","SAMIUR",626,0) set site=$get(filter("siteid")) "RTN","SAMIUR",627,0) quit:site="" "RTN","SAMIUR",628,0) set datephrase="Work List" "RTN","SAMIUR",629,0) new lroot set lroot=$$setroot^%wd("patient-lookup") "RTN","SAMIUR",630,0) new proot set proot=$$setroot^%wd("vapals-patients") "RTN","SAMIUR",631,0) ; "RTN","SAMIUR",632,0) new dfn set dfn=0 "RTN","SAMIUR",633,0) for set dfn=$order(@lroot@("dfn",dfn)) quit:+dfn=0 do ; "RTN","SAMIUR",634,0) . quit:$order(@proot@("dfn",dfn,""))'="" "RTN","SAMIUR",635,0) . new ien set ien=$order(@lroot@("dfn",dfn,"")) "RTN","SAMIUR",636,0) . quit:ien="" "RTN","SAMIUR",637,0) . ; "RTN","SAMIUR",638,0) . ; write !,"dfn= ",dfn "RTN","SAMIUR",639,0) . ; zwrite @lroot@(ien,*) "RTN","SAMIUR",640,0) . ; "RTN","SAMIUR",641,0) . quit:$get(@lroot@(ien,"siteid"))'=site "RTN","SAMIUR",642,0) . ; "RTN","SAMIUR",643,0) . merge ^gpl("worklist","lroot",ien)=@lroot@(ien) "RTN","SAMIUR",644,0) . merge SAMIPATS(ien,dfn)=@lroot@(ien) "RTN","SAMIUR",645,0) . new name set name=$get(SAMIPATS(ien,dfn,"saminame")) "RTN","SAMIUR",646,0) . ; new name set name=$get(SAMIPATS(ien,dfn,"sinamef")) "RTN","SAMIUR",647,0) . ; set name=name_","_SAMIPATS(ien,dfn,"sinamel") "RTN","SAMIUR",648,0) . new nuhref set nuhref="<form method=POST action=""/vapals"">" "RTN","SAMIUR",649,0) . set nuhref=nuhref_"<input type=hidden name=""samiroute"" value=""newcase"">" "RTN","SAMIUR",650,0) . set nuhref=nuhref_"<input type=hidden name=""dfn"" value="_dfn_">" "RTN","SAMIUR",651,0) . set nuhref=nuhref_"<input type=hidden name=""siteid"" value="_site_">" "RTN","SAMIUR",652,0) . set nuhref=nuhref_"<input value="""_name_""" class=""btn btn-link"" role=""link"" type=""submit""></form>" "RTN","SAMIUR",653,0) . set SAMIPATS(ien,dfn,"workref")=nuhref "RTN","SAMIUR",654,0) . quit "RTN","SAMIUR",655,0) ; "RTN","SAMIUR",656,0) merge ^gpl("worklist","pats")=SAMIPATS "RTN","SAMIUR",657,0) ; "RTN","SAMIUR",658,0) quit ; end of WKLIST "RTN","SAMIUR",659,0) ; "RTN","SAMIUR",660,0) ; "RTN","SAMIUR",661,0) ; "RTN","SAMIUR",662,0) EOR ; end of SAMIUR "RTN","SAMIUR2") 0^21^B1203305457 "RTN","SAMIUR2",1,0) SAMIUR2 ;ven/gpl - user reports cont ;2021-07-13t00:02z "RTN","SAMIUR2",2,0) ;;18.0;SAMI;**5,11,12**;2020-01;Build 6 "RTN","SAMIUR2",3,0) ;;1.18.0.12-t3+i12 "RTN","SAMIUR2",4,0) ; "RTN","SAMIUR2",5,0) ; SAMIUR2 contains subroutines for creating & implementing the "RTN","SAMIUR2",6,0) ; report-definition table. "RTN","SAMIUR2",7,0) ; "RTN","SAMIUR2",8,0) quit ; no entry from top "RTN","SAMIUR2",9,0) ; "RTN","SAMIUR2",10,0) ; "RTN","SAMIUR2",11,0) ; "RTN","SAMIUR2",12,0) ;@section 0 primary development "RTN","SAMIUR2",13,0) ; "RTN","SAMIUR2",14,0) ; "RTN","SAMIUR2",15,0) ; "RTN","SAMIUR2",16,0) ;@routine-credits "RTN","SAMIUR2",17,0) ;@primary-dev George P. Lilly (gpl) "RTN","SAMIUR2",18,0) ; gpl@vistaexpertise.net "RTN","SAMIUR2",19,0) ;@primary-dev-org Vista Expertise Network (ven) "RTN","SAMIUR2",20,0) ; http://vistaexpertise.net "RTN","SAMIUR2",21,0) ;@copyright 2017/2021, gpl, all rights reserved "RTN","SAMIUR2",22,0) ;@license see routine SAMIUL "RTN","SAMIUR2",23,0) ; "RTN","SAMIUR2",24,0) ;@last-updated 2021-07-13t00:02z "RTN","SAMIUR2",25,0) ;@application Screening Applications Management (SAM) "RTN","SAMIUR2",26,0) ;@module Screening Applications Management - IELCAP (SAMI) "RTN","SAMIUR2",27,0) ;@suite-of-files SAMI Forms (311.101-311.199) "RTN","SAMIUR2",28,0) ;@version 1.18.0.12-t3+i12 "RTN","SAMIUR2",29,0) ;@release-date 2020-01 "RTN","SAMIUR2",30,0) ;@patch-list **5,11,12** "RTN","SAMIUR2",31,0) ; "RTN","SAMIUR2",32,0) ;@additional-dev Frederick D. S. Marshall (toad) "RTN","SAMIUR2",33,0) ; toad@vistaexpertise.net "RTN","SAMIUR2",34,0) ;@additional-dev Larry G. Carlson (lgc) "RTN","SAMIUR2",35,0) ; larry.g.carlson@gmail.com "RTN","SAMIUR2",36,0) ;@additional-dev Alexis R. Carlson (arc) "RTN","SAMIUR2",37,0) ; whatisthehumanspirit@gmail.com "RTN","SAMIUR2",38,0) ;@additional-dev Kenneth McGlothlen (mcglk) "RTN","SAMIUR2",39,0) ; mcglk@vistaexpertise.net "RTN","SAMIUR2",40,0) ; "RTN","SAMIUR2",41,0) ;@module-credits see SAMIHUL "RTN","SAMIUR2",42,0) ; "RTN","SAMIUR2",43,0) ;@module-log repo github.com:VA-PALS-ELCAP/SAMI-VAPALS-ELCAP.git "RTN","SAMIUR2",44,0) ; see SAMIURUL "RTN","SAMIUR2",45,0) ; "RTN","SAMIUR2",46,0) ;@contents "RTN","SAMIUR2",47,0) ; RPTTBL build report-definition table "RTN","SAMIUR2",48,0) ; "RTN","SAMIUR2",49,0) ; $$DFN2SID study id for patient DFN "RTN","SAMIUR2",50,0) ; $$MKNAV html for navigation to form "RTN","SAMIUR2",51,0) ; "RTN","SAMIUR2",52,0) ; $$SHDET table contents for smoking history "RTN","SAMIUR2",53,0) ; CUMPY forms array of cummulative pack year data "RTN","SAMIUR2",54,0) ; $$FMDT convert date to fileman format "RTN","SAMIUR2",55,0) ; $$PKYDT pack-years from start & end & cigs/day "RTN","SAMIUR2",56,0) ; $$PKY pack-years from years & packs/day "RTN","SAMIUR2",57,0) ; "RTN","SAMIUR2",58,0) ; $$AGE age "RTN","SAMIUR2",59,0) ; $$BLINEDT baseline date "RTN","SAMIUR2",60,0) ; $$CONTACT patient street address "RTN","SAMIUR2",61,0) ; $$CTPROT ct protocol "RTN","SAMIUR2",62,0) ; $$DOB date of birth "RTN","SAMIUR2",63,0) ; $$FUDATE followup date "RTN","SAMIUR2",64,0) ; $$GENDER gender "RTN","SAMIUR2",65,0) ; $$IFORM name(s) of incomplete forms "RTN","SAMIUR2",66,0) ; $$LASTEXM patient last exam "RTN","SAMIUR2",67,0) ; $$MANPAT unmatched patient cell "RTN","SAMIUR2",68,0) ; $$MATCH match button cell "RTN","SAMIUR2",69,0) ; $$NAME name w/hyperlink "RTN","SAMIUR2",70,0) ; $$PACKYRS smoking status "RTN","SAMIUR2",71,0) ; $$POSSIBLE possible match cell "RTN","SAMIUR2",72,0) ; $$RECOM recommendation "RTN","SAMIUR2",73,0) ; $$RURAL patient's rural/urban status "RTN","SAMIUR2",74,0) ; $$SID study id "RTN","SAMIUR2",75,0) ; $$SMHIS smoking history cell "RTN","SAMIUR2",76,0) ; $$SMKSTAT smoking status "RTN","SAMIUR2",77,0) ; $$SSN social security number "RTN","SAMIUR2",78,0) ; $$STUDYDT latest study date "RTN","SAMIUR2",79,0) ; $$STUDYTYP latest study type "RTN","SAMIUR2",80,0) ; $$VALS form-values cell "RTN","SAMIUR2",81,0) ; $$WHEN followup text "RTN","SAMIUR2",82,0) ; $$WORKPAT worklist patient name cell "RTN","SAMIUR2",83,0) ; "RTN","SAMIUR2",84,0) ; EPAT patient name w/nav to enrollment "RTN","SAMIUR2",85,0) ; ETHNCTY ethnicity "RTN","SAMIUR2",86,0) ; RACE race "RTN","SAMIUR2",87,0) ; STATUS patient status "RTN","SAMIUR2",88,0) ; WSVALS display form values from graph "RTN","SAMIUR2",89,0) ; "RTN","SAMIUR2",90,0) ; "RTN","SAMIUR2",91,0) ; "RTN","SAMIUR2",92,0) ;@section 1 ppi RPTTBL^SAMIUR2 "RTN","SAMIUR2",93,0) ; "RTN","SAMIUR2",94,0) ; "RTN","SAMIUR2",95,0) ; "RTN","SAMIUR2",96,0) RPTTBL(RPT,TYPE,SITE) ; RPT is passed by reference and returns the "RTN","SAMIUR2",97,0) ; report definition table. TYPE is the report type to be returned "RTN","SAMIUR2",98,0) ; This routine could use a file or a graph in the next version "RTN","SAMIUR2",99,0) ; "RTN","SAMIUR2",100,0) ;;private;procedure;clean;silent;sac "RTN","SAMIUR2",101,0) ;@called-by "RTN","SAMIUR2",102,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",103,0) ; WSREPORT^SAMIUR1 (which then calls WSREPORT^SAMIUR) "RTN","SAMIUR2",104,0) ;@calls none (defines calls for WSREPORT^SAMIUR to call) "RTN","SAMIUR2",105,0) ;@input "RTN","SAMIUR2",106,0) ; TYPE = report type to return "RTN","SAMIUR2",107,0) ;@output "RTN","SAMIUR2",108,0) ; .RPT report-definition table "RTN","SAMIUR2",109,0) ; "RTN","SAMIUR2",110,0) ; This routine could use a file or a graph in the next version "RTN","SAMIUR2",111,0) ; "RTN","SAMIUR2",112,0) if TYPE="followup" do quit ; "RTN","SAMIUR2",113,0) . set RPT(1,"header")="F/U Date" "RTN","SAMIUR2",114,0) . set RPT(1,"routine")="$$FUDATE^SAMIUR2" "RTN","SAMIUR2",115,0) . set RPT(2,"header")="Name" "RTN","SAMIUR2",116,0) . set RPT(2,"routine")="$$NAME^SAMIUR2" "RTN","SAMIUR2",117,0) . ;set RPT(3,"header")="SSN" "RTN","SAMIUR2",118,0) . set RPT(3,"header")=$$SSNLABEL(SITE) "RTN","SAMIUR2",119,0) . set RPT(3,"routine")="$$SSN^SAMIUR2" "RTN","SAMIUR2",120,0) . set RPT(4,"header")="Baseline Date" "RTN","SAMIUR2",121,0) . set RPT(4,"routine")="$$BLINEDT^SAMIUR2" "RTN","SAMIUR2",122,0) . set RPT(6,"header")="Recommend" "RTN","SAMIUR2",123,0) . set RPT(6,"routine")="$$RECOM^SAMIUR2" "RTN","SAMIUR2",124,0) . set RPT(7,"header")="When" "RTN","SAMIUR2",125,0) . set RPT(7,"routine")="$$WHEN^SAMIUR2" "RTN","SAMIUR2",126,0) . set RPT(5,"header")="Last Exam" "RTN","SAMIUR2",127,0) . set RPT(5,"routine")="$$LASTEXM^SAMIUR2" "RTN","SAMIUR2",128,0) . set RPT(8,"header")="Contact Information" "RTN","SAMIUR2",129,0) . set RPT(8,"routine")="$$CONTACT^SAMIUR2" "RTN","SAMIUR2",130,0) . quit "RTN","SAMIUR2",131,0) ; "RTN","SAMIUR2",132,0) if TYPE="activity" do quit ; "RTN","SAMIUR2",133,0) . set RPT(1,"header")="Name" "RTN","SAMIUR2",134,0) . set RPT(1,"routine")="$$NAME^SAMIUR2" "RTN","SAMIUR2",135,0) . set RPT(2,"header")=$$SSNLABEL(SITE) "RTN","SAMIUR2",136,0) . set RPT(2,"routine")="$$SSN^SAMIUR2" "RTN","SAMIUR2",137,0) . set RPT(3,"header")="CT Date" "RTN","SAMIUR2",138,0) . set RPT(3,"routine")="$$STUDYDT^SAMIUR2" "RTN","SAMIUR2",139,0) . set RPT(4,"header")="Type" "RTN","SAMIUR2",140,0) . set RPT(4,"routine")="$$STUDYTYP^SAMIUR2" "RTN","SAMIUR2",141,0) . set RPT(5,"header")="CT Protocol" "RTN","SAMIUR2",142,0) . set RPT(5,"routine")="$$CTPROT^SAMIUR2" "RTN","SAMIUR2",143,0) . set RPT(6,"header")="Follow-up" "RTN","SAMIUR2",144,0) . set RPT(6,"routine")="$$RECOM^SAMIUR2" "RTN","SAMIUR2",145,0) . set RPT(7,"header")="When" "RTN","SAMIUR2",146,0) . set RPT(7,"routine")="$$WHEN^SAMIUR2" "RTN","SAMIUR2",147,0) . set RPT(8,"header")="on Date" "RTN","SAMIUR2",148,0) . set RPT(8,"routine")="$$FUDATE^SAMIUR2" "RTN","SAMIUR2",149,0) . quit "RTN","SAMIUR2",150,0) ; "RTN","SAMIUR2",151,0) if TYPE="enrollment" do quit ; "RTN","SAMIUR2",152,0) . set RPT(1,"header")="Name" "RTN","SAMIUR2",153,0) . set RPT(1,"routine")="$$NAME^SAMIUR2" "RTN","SAMIUR2",154,0) . set RPT(2,"header")=$$SSNLABEL(SITE) "RTN","SAMIUR2",155,0) . set RPT(2,"routine")="$$SSN^SAMIUR2" "RTN","SAMIUR2",156,0) . set RPT(3,"header")="CT Date" "RTN","SAMIUR2",157,0) . set RPT(3,"routine")="$$STUDYDT^SAMIUR2" "RTN","SAMIUR2",158,0) . set RPT(4,"header")="Gender" "RTN","SAMIUR2",159,0) . set RPT(4,"routine")="$$GENDER^SAMIUR2" "RTN","SAMIUR2",160,0) . ; set RPT(5,"header")="Race" "RTN","SAMIUR2",161,0) . ; set RPT(5,"routine")="$$RACE^SAMIUR2" "RTN","SAMIUR2",162,0) . set RPT(6,"header")="Age" "RTN","SAMIUR2",163,0) . set RPT(6,"routine")="$$AGE^SAMIUR2" "RTN","SAMIUR2",164,0) . set RPT(7,"header")="Urban/Rural" "RTN","SAMIUR2",165,0) . set RPT(7,"routine")="$$RURAL^SAMIUR2" "RTN","SAMIUR2",166,0) . set RPT(8,"header")="Smoking Status" "RTN","SAMIUR2",167,0) . set RPT(8,"routine")="$$SMKSTAT^SAMIUR2" "RTN","SAMIUR2",168,0) . set RPT(9,"header")="Pack Years at Intake" "RTN","SAMIUR2",169,0) . set RPT(9,"routine")="$$PACKYRS^SAMIUR2" "RTN","SAMIUR2",170,0) . quit "RTN","SAMIUR2",171,0) ; "RTN","SAMIUR2",172,0) if TYPE="inactive" do quit ; "RTN","SAMIUR2",173,0) . set RPT(1,"header")="Name" "RTN","SAMIUR2",174,0) . set RPT(1,"routine")="$$NAME^SAMIUR2" "RTN","SAMIUR2",175,0) . set RPT(2,"header")=$$SSNLABEL(SITE) "RTN","SAMIUR2",176,0) . set RPT(2,"routine")="$$SSN^SAMIUR2" "RTN","SAMIUR2",177,0) . set RPT(3,"header")="Enrollment date" "RTN","SAMIUR2",178,0) . set RPT(3,"routine")="$$BLINEDT^SAMIUR2" "RTN","SAMIUR2",179,0) . ;set RPT(3,"header")="CT Date" "RTN","SAMIUR2",180,0) . ;set RPT(3,"routine")="$$STUDYDT^SAMIUR2" "RTN","SAMIUR2",181,0) . ;set RPT(4,"header")="Gender" "RTN","SAMIUR2",182,0) . ;set RPT(4,"routine")="$$GENDER^SAMIUR2" "RTN","SAMIUR2",183,0) . ; set RPT(5,"header")="Race" "RTN","SAMIUR2",184,0) . ; set RPT(5,"routine")="$$RACE^SAMIUR2" "RTN","SAMIUR2",185,0) . ;set RPT(6,"header")="Age" "RTN","SAMIUR2",186,0) . ;set RPT(6,"routine")="$$AGE^SAMIUR2" "RTN","SAMIUR2",187,0) . set RPT(4,"header")="Date of Death" "RTN","SAMIUR2",188,0) . set RPT(4,"routine")="$$INACTDT^SAMIUR2" "RTN","SAMIUR2",189,0) . set RPT(5,"header")="Inactive Reason" "RTN","SAMIUR2",190,0) . set RPT(5,"routine")="$$INACTRE^SAMIUR2" "RTN","SAMIUR2",191,0) . set RPT(6,"header")="Inactive Comment" "RTN","SAMIUR2",192,0) . set RPT(6,"routine")="$$INACTCM^SAMIUR2" "RTN","SAMIUR2",193,0) . ;set RPT(7,"header")="Urban/Rural" "RTN","SAMIUR2",194,0) . ;set RPT(7,"routine")="$$RURAL^SAMIUR2" "RTN","SAMIUR2",195,0) . ;set RPT(8,"header")="Smoking Status" "RTN","SAMIUR2",196,0) . ;set RPT(8,"routine")="$$SMKSTAT^SAMIUR2" "RTN","SAMIUR2",197,0) . ;set RPT(9,"header")="Pack Years at Intake" "RTN","SAMIUR2",198,0) . ;set RPT(9,"routine")="$$PACKYRS^SAMIUR2" "RTN","SAMIUR2",199,0) . quit "RTN","SAMIUR2",200,0) ; "RTN","SAMIUR2",201,0) if TYPE="incomplete" do quit ; "RTN","SAMIUR2",202,0) . set RPT(1,"header")="Enrollment date" "RTN","SAMIUR2",203,0) . set RPT(1,"routine")="$$BLINEDT^SAMIUR2" "RTN","SAMIUR2",204,0) . set RPT(2,"header")="Name" "RTN","SAMIUR2",205,0) . set RPT(2,"routine")="$$NAME^SAMIUR2" "RTN","SAMIUR2",206,0) . set RPT(3,"header")=$$SSNLABEL(SITE) "RTN","SAMIUR2",207,0) . set RPT(3,"routine")="$$SSN^SAMIUR2" "RTN","SAMIUR2",208,0) . set RPT(4,"header")="Incomplete form" "RTN","SAMIUR2",209,0) . set RPT(4,"routine")="$$IFORM^SAMIUR2" "RTN","SAMIUR2",210,0) . quit "RTN","SAMIUR2",211,0) ; "RTN","SAMIUR2",212,0) if TYPE="missingct" do quit ; "RTN","SAMIUR2",213,0) . set RPT(1,"header")="Last contact date" "RTN","SAMIUR2",214,0) . set RPT(1,"routine")="$$LDOC^SAMIUR2" "RTN","SAMIUR2",215,0) . set RPT(2,"header")="Last contact entry" "RTN","SAMIUR2",216,0) . set RPT(2,"routine")="$$LENTRY^SAMIUR2" "RTN","SAMIUR2",217,0) . set RPT(3,"header")="Name" "RTN","SAMIUR2",218,0) . set RPT(3,"routine")="$$NAME^SAMIUR2" "RTN","SAMIUR2",219,0) . set RPT(4,"header")=$$SSNLABEL(SITE) "RTN","SAMIUR2",220,0) . set RPT(4,"routine")="$$SSN^SAMIUR2" "RTN","SAMIUR2",221,0) . set RPT(5,"header")="Enrollment date" "RTN","SAMIUR2",222,0) . set RPT(5,"routine")="$$BLINEDT^SAMIUR2" "RTN","SAMIUR2",223,0) . quit "RTN","SAMIUR2",224,0) ; "RTN","SAMIUR2",225,0) if TYPE="cumpy" do quit ; "RTN","SAMIUR2",226,0) . set RPT(1,"header")="Name" "RTN","SAMIUR2",227,0) . set RPT(1,"routine")="$$NAME^SAMIUR2" "RTN","SAMIUR2",228,0) . set RPT(2,"header")="Study ID" "RTN","SAMIUR2",229,0) . set RPT(2,"routine")="$$SID^SAMIUR2" "RTN","SAMIUR2",230,0) . set RPT(3,"header")="Form Values" "RTN","SAMIUR2",231,0) . set RPT(3,"routine")="$$VALS^SAMIUR2" "RTN","SAMIUR2",232,0) . set RPT(4,"header")="Smoking History" "RTN","SAMIUR2",233,0) . set RPT(4,"routine")="$$SMHIS^SAMIUR2" "RTN","SAMIUR2",234,0) . quit "RTN","SAMIUR2",235,0) ; "RTN","SAMIUR2",236,0) if TYPE="unmatched" do ; "RTN","SAMIUR2",237,0) . set RPT(1,"header")="Unmatched Manual Entry" "RTN","SAMIUR2",238,0) . set RPT(1,"routine")="$$MANPAT^SAMIUR2" "RTN","SAMIUR2",239,0) . set RPT(2,"header")="Possible HL7 Match" "RTN","SAMIUR2",240,0) . set RPT(2,"routine")="$$POSSIBLE^SAMIUR2" "RTN","SAMIUR2",241,0) . set RPT(3,"header")="Match Control" "RTN","SAMIUR2",242,0) . set RPT(3,"routine")="$$MATCH^SAMIUR2" "RTN","SAMIUR2",243,0) . quit "RTN","SAMIUR2",244,0) ; "RTN","SAMIUR2",245,0) if TYPE="worklist" do quit ; "RTN","SAMIUR2",246,0) . set RPT(1,"header")="Name" "RTN","SAMIUR2",247,0) . set RPT(1,"routine")="$$WORKPAT^SAMIUR2" "RTN","SAMIUR2",248,0) . set RPT(2,"header")=$$SSNLABEL(SITE) "RTN","SAMIUR2",249,0) . set RPT(2,"routine")="$$SSN^SAMIUR2" "RTN","SAMIUR2",250,0) . set RPT(3,"header")="Date of birth" "RTN","SAMIUR2",251,0) . set RPT(3,"routine")="$$DOB^SAMIUR2" "RTN","SAMIUR2",252,0) . set RPT(4,"header")="Gender" "RTN","SAMIUR2",253,0) . set RPT(4,"routine")="$$GENDER^SAMIUR2" "RTN","SAMIUR2",254,0) . quit "RTN","SAMIUR2",255,0) ; "RTN","SAMIUR2",256,0) quit ; end of ppi RPTTBL^SAMIUR2 "RTN","SAMIUR2",257,0) ; "RTN","SAMIUR2",258,0) ; "RTN","SAMIUR2",259,0) ; "RTN","SAMIUR2",260,0) ;@section 2 shared subroutines "RTN","SAMIUR2",261,0) ; "RTN","SAMIUR2",262,0) ; "RTN","SAMIUR2",263,0) ; "RTN","SAMIUR2",264,0) DFN2SID(DFN) ;studyid for patient DFN "RTN","SAMIUR2",265,0) ; "RTN","SAMIUR2",266,0) ;;private;function;clean;silent;sac "RTN","SAMIUR2",267,0) ;@called-by "RTN","SAMIUR2",268,0) ; $$SID^SAMIUR2 "RTN","SAMIUR2",269,0) ; $$IFORM^SAMIUR2 "RTN","SAMIUR2",270,0) ; $$VALS^SAMIUR2 "RTN","SAMIUR2",271,0) ; $$SMHIS^SAMIUR2 "RTN","SAMIUR2",272,0) ;@calls "RTN","SAMIUR2",273,0) ; $$setroot^%wd "RTN","SAMIUR2",274,0) ; "RTN","SAMIUR2",275,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIUR2",276,0) ; "RTN","SAMIUR2",277,0) quit $get(@root@(DFN,"sisid")) ; end of $$DFN2SID "RTN","SAMIUR2",278,0) ; "RTN","SAMIUR2",279,0) ; "RTN","SAMIUR2",280,0) ; "RTN","SAMIUR2",281,0) MKNAV(sid,zform,fname,form) ; html for navigation to form "RTN","SAMIUR2",282,0) ; "RTN","SAMIUR2",283,0) ;;private;function;clean;silent;sac "RTN","SAMIUR2",284,0) ;@called-by "RTN","SAMIUR2",285,0) ; $$IFORM^SAMIUR2 "RTN","SAMIUR2",286,0) ;@calls none "RTN","SAMIUR2",287,0) ; "RTN","SAMIUR2",288,0) new rtn set rtn="<form method=""post"" action=""/vapals"">" "RTN","SAMIUR2",289,0) set rtn=rtn_"<input name=""samiroute"" value=""form"" type=""hidden"">" "RTN","SAMIUR2",290,0) set rtn=rtn_" <input name=""studyid"" value="""_sid_""" type=""hidden"">" "RTN","SAMIUR2",291,0) set rtn=rtn_" <input name=""form"" value=""vapals:"_zform_""" type=""hidden"">" "RTN","SAMIUR2",292,0) set rtn=rtn_" <input value="""_fname_""" class=""btn btn-link"" role=""link"" type=""submit""></form>"_$char(13) "RTN","SAMIUR2",293,0) ; "RTN","SAMIUR2",294,0) quit rtn ; end of $$MKNAV "RTN","SAMIUR2",295,0) ; "RTN","SAMIUR2",296,0) ; "RTN","SAMIUR2",297,0) ; "RTN","SAMIUR2",298,0) ;@section 3 smoking history subroutines "RTN","SAMIUR2",299,0) ; "RTN","SAMIUR2",300,0) ; "RTN","SAMIUR2",301,0) ; "RTN","SAMIUR2",302,0) SHDET(SID,KEY) ; table contents for smoking history "RTN","SAMIUR2",303,0) ; "RTN","SAMIUR2",304,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",305,0) ;@called-by "RTN","SAMIUR2",306,0) ; LOAD^SAMIFLD "RTN","SAMIUR2",307,0) ; $$SMHIS^SAMIUR2 "RTN","SAMIUR2",308,0) ;@calls "RTN","SAMIUR2",309,0) ; CUMPY "RTN","SAMIUR2",310,0) ; "RTN","SAMIUR2",311,0) ; KEY is the form key of the caller for "current" marker insertion "RTN","SAMIUR2",312,0) ; "RTN","SAMIUR2",313,0) new pyary "RTN","SAMIUR2",314,0) if $get(KEY)="" set KEY="" "RTN","SAMIUR2",315,0) do CUMPY("pyary",SID,KEY) "RTN","SAMIUR2",316,0) ; "RTN","SAMIUR2",317,0) new current set current=$get(pyary("current")) "RTN","SAMIUR2",318,0) new rptcnt set rptcnt=0 "RTN","SAMIUR2",319,0) new rptmax set rptmax=$order(pyary("rpt",""),-1) "RTN","SAMIUR2",320,0) quit:+rptmax=0 "RTN","SAMIUR2",321,0) ; "RTN","SAMIUR2",322,0) new return set return="" "RTN","SAMIUR2",323,0) new zi set zi="" "RTN","SAMIUR2",324,0) for zi=1:1:rptmax do ; "RTN","SAMIUR2",325,0) . set rptcnt=rptcnt+1 "RTN","SAMIUR2",326,0) . if rptcnt=current set return=return_"<tr data-current-form=""true"">" "RTN","SAMIUR2",327,0) . else set return=return_"<tr>" "RTN","SAMIUR2",328,0) . set return=return_"<td>"_pyary("rpt",rptcnt,1)_"</td>" "RTN","SAMIUR2",329,0) . set return=return_"<td class=""reported-date"">"_pyary("rpt",rptcnt,2)_"</td>" "RTN","SAMIUR2",330,0) . set return=return_"<td class=""pack-years"">"_pyary("rpt",rptcnt,3)_"</td>" "RTN","SAMIUR2",331,0) . set return=return_"<td class=""cumulative-pack-years"">"_pyary("rpt",rptcnt,4)_"</td>" "RTN","SAMIUR2",332,0) . set return=return_"</tr>" "RTN","SAMIUR2",333,0) . quit "RTN","SAMIUR2",334,0) ; "RTN","SAMIUR2",335,0) quit return ; end of ppi $$SHDET^SAMIUR2 "RTN","SAMIUR2",336,0) ; "RTN","SAMIUR2",337,0) ; "RTN","SAMIUR2",338,0) ; "RTN","SAMIUR2",339,0) CUMPY(PYARY,sid,KEY) ; forms array of cummulative pack year data "RTN","SAMIUR2",340,0) ; "RTN","SAMIUR2",341,0) ;;ppi;procedure;clean;silent;sac "RTN","SAMIUR2",342,0) ;@called-by "RTN","SAMIUR2",343,0) ; SSTATUS^SAMINOT2 "RTN","SAMIUR2",344,0) ; SSTATUS^SAMINOT3 "RTN","SAMIUR2",345,0) ; $$SHDET "RTN","SAMIUR2",346,0) ;@calls "RTN","SAMIUR2",347,0) ; $$setroot^%wd "RTN","SAMIUR2",348,0) ; GETITEMS^SAMICASE "RTN","SAMIUR2",349,0) ; $$GETDTKEY^SAMICAS2 "RTN","SAMIUR2",350,0) ; $$KEY2DSPD^SAMICAS2 "RTN","SAMIUR2",351,0) ; $$FMDT "RTN","SAMIUR2",352,0) ; $$PKYDT "RTN","SAMIUR2",353,0) ; "RTN","SAMIUR2",354,0) ; PYARY passed by name "RTN","SAMIUR2",355,0) ; KEY is the current form key for matching to a row "RTN","SAMIUR2",356,0) ; "RTN","SAMIUR2",357,0) kill @PYARY "RTN","SAMIUR2",358,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIUR2",359,0) ; new sid set sid=$get(@root@(DFN,"samistudyid")) "RTN","SAMIUR2",360,0) ; quit:sid="" "RTN","SAMIUR2",361,0) ; "RTN","SAMIUR2",362,0) new items set items="" "RTN","SAMIUR2",363,0) do GETITEMS^SAMICASE("items",sid) "RTN","SAMIUR2",364,0) quit:'$data(items) "RTN","SAMIUR2",365,0) merge @PYARY@("items")=items "RTN","SAMIUR2",366,0) ; "RTN","SAMIUR2",367,0) new siform set siform=$order(items("siform")) "RTN","SAMIUR2",368,0) quit:siform="" "RTN","SAMIUR2",369,0) if siform=$get(KEY) set @PYARY@("current")=1 ;this row is the current form "RTN","SAMIUR2",370,0) ; "RTN","SAMIUR2",371,0) set @PYARY@("rpt",1,1)="Intake" ; Form "RTN","SAMIUR2",372,0) new kdate set kdate=$$GETDTKEY^SAMICAS2(siform) "RTN","SAMIUR2",373,0) new keydate set keydate=$$KEY2DSPD^SAMICAS2(kdate) "RTN","SAMIUR2",374,0) set @PYARY@("rpt",1,2)=keydate ; Reported Date "RTN","SAMIUR2",375,0) ; "RTN","SAMIUR2",376,0) new vals set vals=$name(@root@("graph",sid,siform)) "RTN","SAMIUR2",377,0) new lastcum set lastcum=$get(@vals@("sippy")) "RTN","SAMIUR2",378,0) set @PYARY@("rpt",1,3)=lastcum ; Pack Years "RTN","SAMIUR2",379,0) set @PYARY@("rpt",1,4)=lastcum ; Cumulative "RTN","SAMIUR2",380,0) ; "RTN","SAMIUR2",381,0) new lastdt set lastdt=keydate "RTN","SAMIUR2",382,0) new rptcnt set rptcnt=1 "RTN","SAMIUR2",383,0) new zi set zi="" "RTN","SAMIUR2",384,0) for do quit:zi="" ; "RTN","SAMIUR2",385,0) . set zi=$order(items("type","vapals:fuform",zi)) "RTN","SAMIUR2",386,0) . quit:zi="" "RTN","SAMIUR2",387,0) . ; "RTN","SAMIUR2",388,0) . set rptcnt=rptcnt+1 "RTN","SAMIUR2",389,0) . set @PYARY@("rpt",rptcnt,1)="Follow-up" "RTN","SAMIUR2",390,0) . new kdate set kdate=$$GETDTKEY^SAMICAS2(zi) "RTN","SAMIUR2",391,0) . new keydate set keydate=$$KEY2DSPD^SAMICAS2(kdate) "RTN","SAMIUR2",392,0) . set @PYARY@("rpt",rptcnt,2)=keydate ; Reported Date "RTN","SAMIUR2",393,0) . ; "RTN","SAMIUR2",394,0) . set vals=$name(@root@("graph",sid,zi)) "RTN","SAMIUR2",395,0) . new newpd set newpd=$g(@vals@("sippd")) "RTN","SAMIUR2",396,0) . new usedate set usedate=keydate "RTN","SAMIUR2",397,0) . new siq set siq=$get(@vals@("siq")) ; quit date on followup form "RTN","SAMIUR2",398,0) . if siq'="" do ; quit date provided "RTN","SAMIUR2",399,0) . . quit:$$FMDT(siq)<$$FMDT(lastdt) ; quit date out of range "RTN","SAMIUR2",400,0) . . quit:$$FMDT(siq)>$$FMDT(keydate) ; quit date out of range "RTN","SAMIUR2",401,0) . . set usedate=siq ; use the quit date as end of range "RTN","SAMIUR2",402,0) . . quit "RTN","SAMIUR2",403,0) . new newpy set newpy=$$PKYDT(lastdt,usedate,newpd) "RTN","SAMIUR2",404,0) . set @vals@("sippy")=newpy "RTN","SAMIUR2",405,0) . ; "RTN","SAMIUR2",406,0) . set ^gpl("current","KEY")=$get(KEY) "RTN","SAMIUR2",407,0) . set ^gpl("current","zi")=zi "RTN","SAMIUR2",408,0) . if zi=$get(KEY) do "RTN","SAMIUR2",409,0) . . set @PYARY@("current")=rptcnt ;this row is the current form "RTN","SAMIUR2",410,0) . . quit "RTN","SAMIUR2",411,0) . ; "RTN","SAMIUR2",412,0) . new newcum set newcum="" "RTN","SAMIUR2",413,0) . if newpy'="" set newcum=lastcum+newpy "RTN","SAMIUR2",414,0) . set @PYARY@("rpt",rptcnt,3)=newpy ; Pack Years "RTN","SAMIUR2",415,0) . set @PYARY@("rpt",rptcnt,4)=newcum ; Cumulative "RTN","SAMIUR2",416,0) . set lastdt=keydate "RTN","SAMIUR2",417,0) . set lastcum=newcum "RTN","SAMIUR2",418,0) . quit "RTN","SAMIUR2",419,0) ; "RTN","SAMIUR2",420,0) quit ; end of ppi CUMPY^SAMIUR2 "RTN","SAMIUR2",421,0) ; "RTN","SAMIUR2",422,0) ; "RTN","SAMIUR2",423,0) ; "RTN","SAMIUR2",424,0) FMDT(ZDT) ; convert date to fileman format "RTN","SAMIUR2",425,0) ; "RTN","SAMIUR2",426,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",427,0) ;@called-by "RTN","SAMIUR2",428,0) ; MKPTLK^SAMIHOM4 "RTN","SAMIUR2",429,0) ; $$PKYDT "RTN","SAMIUR2",430,0) ; CUMPY "RTN","SAMIUR2",431,0) ;@calls "RTN","SAMIUR2",432,0) ; ^%DT "RTN","SAMIUR2",433,0) ; "RTN","SAMIUR2",434,0) new Y "RTN","SAMIUR2",435,0) new X set X=ZDT "RTN","SAMIUR2",436,0) do ^%DT "RTN","SAMIUR2",437,0) ; "RTN","SAMIUR2",438,0) quit Y ; end of ppi $$FMDT^SAMIUR2 "RTN","SAMIUR2",439,0) ; "RTN","SAMIUR2",440,0) ; "RTN","SAMIUR2",441,0) ; "RTN","SAMIUR2",442,0) PKYDT(STDT,ENDT,PKS,CIGS) ; pack-years from start & end & cigs/day "RTN","SAMIUR2",443,0) ; "RTN","SAMIUR2",444,0) ;;private;function;clean;silent;sac "RTN","SAMIUR2",445,0) ;@called-by "RTN","SAMIUR2",446,0) ; CUMPY "RTN","SAMIUR2",447,0) ;@calls "RTN","SAMIUR2",448,0) ; $$FMDT "RTN","SAMIUR2",449,0) ; $$FMDIFF^XLFDT "RTN","SAMIUR2",450,0) ; $$PKY "RTN","SAMIUR2",451,0) ; "RTN","SAMIUR2",452,0) ; if PKS is not provided, 20/CIGS will be used for packs per day "RTN","SAMIUR2",453,0) ; "RTN","SAMIUR2",454,0) new pkyr set pkyr="" "RTN","SAMIUR2",455,0) if $get(PKS)="" do ; "RTN","SAMIUR2",456,0) . if $get(CIGS)="" set PKS=0 quit ; "RTN","SAMIUR2",457,0) . set PKS=20/CIGS "RTN","SAMIUR2",458,0) . quit "RTN","SAMIUR2",459,0) new zst set zst=$$FMDT(STDT) "RTN","SAMIUR2",460,0) set:zst=-1 zst=STDT "RTN","SAMIUR2",461,0) ; "RTN","SAMIUR2",462,0) new zend set zend=$$FMDT(ENDT) "RTN","SAMIUR2",463,0) set:zend=-1 zend=ENDT ; probably a fileman date already "RTN","SAMIUR2",464,0) ; "RTN","SAMIUR2",465,0) new zdif set zdif=$$FMDIFF^XLFDT(zend,zst)/365.24 "RTN","SAMIUR2",466,0) ; "RTN","SAMIUR2",467,0) set pkyr=$$PKY(zdif,PKS) "RTN","SAMIUR2",468,0) ; "RTN","SAMIUR2",469,0) quit pkyr ; end of $$PKYDT "RTN","SAMIUR2",470,0) ; "RTN","SAMIUR2",471,0) ; "RTN","SAMIUR2",472,0) ; "RTN","SAMIUR2",473,0) PKY(YRS,PKS) ; pack-years from years & packs/day "RTN","SAMIUR2",474,0) ; "RTN","SAMIUR2",475,0) ;;private;function;clean;silent;sac "RTN","SAMIUR2",476,0) ;@called-by "RTN","SAMIUR2",477,0) ; $$PKYDT "RTN","SAMIUR2",478,0) ;@calls none "RTN","SAMIUR2",479,0) ;@input "RTN","SAMIUR2",480,0) ; YRS = years "RTN","SAMIUR2",481,0) ; PKS = packs/day "RTN","SAMIUR2",482,0) ; "RTN","SAMIUR2",483,0) new rtn set rtn="" "RTN","SAMIUR2",484,0) set rtn=YRS*PKS "RTN","SAMIUR2",485,0) if $length($piece(rtn,".",2))>2 do ; "RTN","SAMIUR2",486,0) . new zdec set zdec=$piece(rtn,".",2) "RTN","SAMIUR2",487,0) . set rtn=$piece(rtn,".",1)_"."_$extract(zdec,1,2) "RTN","SAMIUR2",488,0) . if $extract(zdec,3)>4 set rtn=rtn+.01 "RTN","SAMIUR2",489,0) . quit "RTN","SAMIUR2",490,0) set:rtn'["." rtn=rtn_".0" "RTN","SAMIUR2",491,0) ; "RTN","SAMIUR2",492,0) quit rtn ; end of $$PKY "RTN","SAMIUR2",493,0) ; "RTN","SAMIUR2",494,0) ; "RTN","SAMIUR2",495,0) ; "RTN","SAMIUR2",496,0) ;@section 4 active column ppis "RTN","SAMIUR2",497,0) ; "RTN","SAMIUR2",498,0) ; "RTN","SAMIUR2",499,0) ; "RTN","SAMIUR2",500,0) AGE(zdt,dfn,SAMIPATS) ; age "RTN","SAMIUR2",501,0) ; "RTN","SAMIUR2",502,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",503,0) ;@called-by "RTN","SAMIUR2",504,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",505,0) ;@calls "RTN","SAMIUR2",506,0) ; $$setroot^%wd "RTN","SAMIUR2",507,0) ; ^%DT "RTN","SAMIUR2",508,0) ; $$NOW^XLFDT "RTN","SAMIUR2",509,0) ; $$FMDIFF^XLFDT "RTN","SAMIUR2",510,0) ; "RTN","SAMIUR2",511,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIUR2",512,0) new dob set dob=$get(@root@(dfn,"sbdob")) ; dob in VAPALS format "RTN","SAMIUR2",513,0) ; "RTN","SAMIUR2",514,0) new Y "RTN","SAMIUR2",515,0) new X set X=dob "RTN","SAMIUR2",516,0) do ^%DT "RTN","SAMIUR2",517,0) ; "RTN","SAMIUR2",518,0) new age set age=$piece($$FMDIFF^XLFDT($$NOW^XLFDT,Y)/365,".") "RTN","SAMIUR2",519,0) ; "RTN","SAMIUR2",520,0) quit age ; end of ppi $$AGE^SAMIUR2 "RTN","SAMIUR2",521,0) ; "RTN","SAMIUR2",522,0) ; "RTN","SAMIUR2",523,0) ; "RTN","SAMIUR2",524,0) BLINEDT(zdt,dfn,SAMIPATS) ; baseline date "RTN","SAMIUR2",525,0) ; "RTN","SAMIUR2",526,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",527,0) ;@called-by "RTN","SAMIUR2",528,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",529,0) ;@calls none "RTN","SAMIUR2",530,0) ; "RTN","SAMIUR2",531,0) new bldt set bldt=$get(SAMIPATS(zdt,dfn,"edate")) "RTN","SAMIUR2",532,0) ; "RTN","SAMIUR2",533,0) quit bldt ; end of ppi $$BLINEDT^SAMIUR2 "RTN","SAMIUR2",534,0) ; "RTN","SAMIUR2",535,0) ; "RTN","SAMIUR2",536,0) ; "RTN","SAMIUR2",537,0) CONTACT(zdt,dfn,SAMIPATS) ; patient street address "RTN","SAMIUR2",538,0) ; "RTN","SAMIUR2",539,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",540,0) ;@called-by "RTN","SAMIUR2",541,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",542,0) ;@calls "RTN","SAMIUR2",543,0) ; $$setroot^%wd "RTN","SAMIUR2",544,0) ; "RTN","SAMIUR2",545,0) new contact set contact="" "RTN","SAMIUR2",546,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIUR2",547,0) new sid set sid=$get(@root@(dfn,"samistudyid")) "RTN","SAMIUR2",548,0) new siform set siform=$get(SAMIPATS(zdt,dfn,"siform")) "RTN","SAMIUR2",549,0) new vals set vals=$name(@root@("graph",sid,siform)) "RTN","SAMIUR2",550,0) set contact=$get(@vals@("sinamef"))_" "_$get(@vals@("sinamel")) "RTN","SAMIUR2",551,0) set contact=contact_"<br>"_$get(@vals@("sipsa")) "RTN","SAMIUR2",552,0) if $get(@vals@("sipan"))'="" do "RTN","SAMIUR2",553,0) . set contact=contact_" Apt "_$get(@vals@("sipan")) "RTN","SAMIUR2",554,0) . quit "RTN","SAMIUR2",555,0) if $get(@vals@("sipcn"))'="" do "RTN","SAMIUR2",556,0) . set contact=contact_"<br>County "_@vals@("sipcn") "RTN","SAMIUR2",557,0) . quit "RTN","SAMIUR2",558,0) if $get(@vals@("sipc"))'="" do "RTN","SAMIUR2",559,0) . set contact=contact_" <br>"_@vals@("sipc")_", " "RTN","SAMIUR2",560,0) . quit "RTN","SAMIUR2",561,0) set contact=contact_" "_$get(@vals@("sips"))_" "_$get(@vals@("sipz"))_" " "RTN","SAMIUR2",562,0) ; "RTN","SAMIUR2",563,0) quit contact ; end of ppi $$CONTACT^SAMIUR2 "RTN","SAMIUR2",564,0) ; "RTN","SAMIUR2",565,0) ; "RTN","SAMIUR2",566,0) ; "RTN","SAMIUR2",567,0) CTPROT(zdt,dfn,SAMIPATS) ; ct protocol "RTN","SAMIUR2",568,0) ; "RTN","SAMIUR2",569,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",570,0) ;@called-by "RTN","SAMIUR2",571,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",572,0) ;@calls "RTN","SAMIUR2",573,0) ; $$setroot^%wd "RTN","SAMIUR2",574,0) ; "RTN","SAMIUR2",575,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIUR2",576,0) new ceform set ceform=$get(SAMIPATS(zdt,dfn,"ceform")) "RTN","SAMIUR2",577,0) quit:ceform="" "" "RTN","SAMIUR2",578,0) ; "RTN","SAMIUR2",579,0) new sid set sid=$get(@root@(dfn,"samistudyid")) "RTN","SAMIUR2",580,0) new vals set vals=$name(@root@("graph",sid,ceform)) "RTN","SAMIUR2",581,0) new cectp set cectp=$get(@vals@("cectp")) "RTN","SAMIUR2",582,0) new ctyp set ctyp=$select(cectp="l":"Low-Dose CT",cectp="d":"Standard CT",cectp="i":"Limited",1:"") "RTN","SAMIUR2",583,0) ; "RTN","SAMIUR2",584,0) quit ctyp ; end of ppi $$CTPROT^SAMIUR2 "RTN","SAMIUR2",585,0) ; "RTN","SAMIUR2",586,0) ; "RTN","SAMIUR2",587,0) ; "RTN","SAMIUR2",588,0) DOB(ien,dfn,SAMIPATS) ; date of birth "RTN","SAMIUR2",589,0) ; "RTN","SAMIUR2",590,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",591,0) ;@called-by "RTN","SAMIUR2",592,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",593,0) ;@calls none "RTN","SAMIUR2",594,0) ; "RTN","SAMIUR2",595,0) new dob set dob=$get(SAMIPATS(ien,dfn,"dob")) "RTN","SAMIUR2",596,0) if dob="" set dob=$get(SAMIPATS(ien,dfn,"sbdob")) "RTN","SAMIUR2",597,0) ; "RTN","SAMIUR2",598,0) quit dob ; end of ppi $$DOB^SAMIUR2 "RTN","SAMIUR2",599,0) ; "RTN","SAMIUR2",600,0) ; "RTN","SAMIUR2",601,0) ; "RTN","SAMIUR2",602,0) FUDATE(zdt,dfn,SAMIPATS) ; followup date "RTN","SAMIUR2",603,0) ; "RTN","SAMIUR2",604,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",605,0) ;@called-by "RTN","SAMIUR2",606,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",607,0) ;@calls none "RTN","SAMIUR2",608,0) ; "RTN","SAMIUR2",609,0) new fud set fud="fudate" "RTN","SAMIUR2",610,0) ; "RTN","SAMIUR2",611,0) quit $get(SAMIPATS(zdt,dfn,"cefud")) ; end of ppi $$FUDATE^SAMIUR2 "RTN","SAMIUR2",612,0) ; "RTN","SAMIUR2",613,0) ; "RTN","SAMIUR2",614,0) ; "RTN","SAMIUR2",615,0) GENDER(zdt,dfn,SAMIPATS) ; gender "RTN","SAMIUR2",616,0) ; "RTN","SAMIUR2",617,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",618,0) ;@called-by "RTN","SAMIUR2",619,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",620,0) ;@calls "RTN","SAMIUR2",621,0) ; $$setroot^%wd "RTN","SAMIUR2",622,0) ; "RTN","SAMIUR2",623,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIUR2",624,0) new lroot set lroot=$$setroot^%wd("patient-lookup") "RTN","SAMIUR2",625,0) ; "RTN","SAMIUR2",626,0) new gend set gend=$get(SAMIPATS(zdt,dfn,"gender")) "RTN","SAMIUR2",627,0) if gend="" do "RTN","SAMIUR2",628,0) . new pien set pien=$order(@root@("dfn",dfn,"")) "RTN","SAMIUR2",629,0) . if pien'="" do ; "RTN","SAMIUR2",630,0) . . set gend=$get(@root@(pien,"sex")) "RTN","SAMIUR2",631,0) . . if gend="" set gend=$get(@root@(pien,"gender")) "RTN","SAMIUR2",632,0) . . quit "RTN","SAMIUR2",633,0) . if gend="" do ; "RTN","SAMIUR2",634,0) . . new lien set lien=$order(@lroot@("dfn",dfn,"")) "RTN","SAMIUR2",635,0) . . set gend=$get(@lroot@(lien,"gender")) "RTN","SAMIUR2",636,0) . . quit "RTN","SAMIUR2",637,0) if gend["^" set gend=$piece(gend,"^",1) "RTN","SAMIUR2",638,0) ; "RTN","SAMIUR2",639,0) quit gend ; end of ppi $$GENDER^SAMIUR2 "RTN","SAMIUR2",640,0) ; "RTN","SAMIUR2",641,0) ; "RTN","SAMIUR2",642,0) ; "RTN","SAMIUR2",643,0) IFORM(zdt,dfn,SAMIPATS) ; name(s) of incomplete forms "RTN","SAMIUR2",644,0) ; "RTN","SAMIUR2",645,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",646,0) ;@called-by "RTN","SAMIUR2",647,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",648,0) ;@calls "RTN","SAMIUR2",649,0) ; $$DFN2SID^SAMIUR2 "RTN","SAMIUR2",650,0) ; $$KEY2FM^SAMICASE "RTN","SAMIUR2",651,0) ; $$VAPALSDT^SAMICASE "RTN","SAMIUR2",652,0) ; $$MKNAV "RTN","SAMIUR2",653,0) ; "RTN","SAMIUR2",654,0) new iform set iform=$get(SAMIPATS(zdt,dfn,"iform")) "RTN","SAMIUR2",655,0) quit:iform="" "" ; "RTN","SAMIUR2",656,0) ; "RTN","SAMIUR2",657,0) new zkey1,zn,typ "RTN","SAMIUR2",658,0) new return set return="<table>" "RTN","SAMIUR2",659,0) for zn=2:1 quit:$piece(iform," ",zn)="" do ; "RTN","SAMIUR2",660,0) . set return=return_"<tr><td>" "RTN","SAMIUR2",661,0) . set zkey1=$piece(iform," ",zn) "RTN","SAMIUR2",662,0) . ; "RTN","SAMIUR2",663,0) . new fname "RTN","SAMIUR2",664,0) . if zkey1["ceform" set fname="CT Evaluation" set typ="ceform" "RTN","SAMIUR2",665,0) . if zkey1["sbform" set fname="Background" set typ="sbform" "RTN","SAMIUR2",666,0) . if zkey1["fuform" set fname="Follow-up" set typ="fuform" "RTN","SAMIUR2",667,0) . if zkey1["bxform" set fname="Biopsy" set typ="bxform" "RTN","SAMIUR2",668,0) . if zkey1["ptform" set fname="PET Evaluation" set typ="ptform" "RTN","SAMIUR2",669,0) . if zkey1["itform" set fname="Intervention" set typ="itform" "RTN","SAMIUR2",670,0) . if zkey1["siform" set fname="Intake Form" set typ="siform" "RTN","SAMIUR2",671,0) . if $get(fname)="" set fname="unknown" set typ="" "RTN","SAMIUR2",672,0) . ; "RTN","SAMIUR2",673,0) . new sid set sid=$$DFN2SID^SAMIUR2(dfn) "RTN","SAMIUR2",674,0) . new zdate set zdate=$$VAPALSDT^SAMICASE($$KEY2FM^SAMICASE(zkey1)) "RTN","SAMIUR2",675,0) . set return=return_$$MKNAV(sid,zkey1,fname_" - "_zdate,typ) "RTN","SAMIUR2",676,0) . set return=return_"</td></tr>" "RTN","SAMIUR2",677,0) . quit "RTN","SAMIUR2",678,0) ; "RTN","SAMIUR2",679,0) set return=return_"</table>" "RTN","SAMIUR2",680,0) ; "RTN","SAMIUR2",681,0) quit return ; end of ppi $$IFORM^SAMIUR2 "RTN","SAMIUR2",682,0) ; "RTN","SAMIUR2",683,0) ; "RTN","SAMIUR2",684,0) ; "RTN","SAMIUR2",685,0) LASTEXM(zdt,dfn,SAMIPATS) ; patient last exam "RTN","SAMIUR2",686,0) ; "RTN","SAMIUR2",687,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",688,0) ;@called-by "RTN","SAMIUR2",689,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",690,0) ;@calls none "RTN","SAMIUR2",691,0) ; "RTN","SAMIUR2",692,0) new lexm set lexm=$get(SAMIPATS(zdt,dfn,"cedos")) "RTN","SAMIUR2",693,0) ; "RTN","SAMIUR2",694,0) quit lexm ; end of ppi $$LASTEXM^SAMIUR2 "RTN","SAMIUR2",695,0) ; "RTN","SAMIUR2",696,0) ; "RTN","SAMIUR2",697,0) INACTDT(zdt,dfn,SAMIPATS) ; inactive date "RTN","SAMIUR2",698,0) ; "RTN","SAMIUR2",699,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",700,0) ;@called-by "RTN","SAMIUR2",701,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",702,0) ;@calls "RTN","SAMIUR2",703,0) ; $$setroot^%wd "RTN","SAMIUR2",704,0) ; "RTN","SAMIUR2",705,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIUR2",706,0) new sid set sid=$get(@root@(dfn,"samistudyid")) "RTN","SAMIUR2",707,0) new siform set siform=$get(SAMIPATS(zdt,dfn,"siform")) "RTN","SAMIUR2",708,0) new vals set vals=$name(@root@("graph",sid,siform)) "RTN","SAMIUR2",709,0) ; "RTN","SAMIUR2",710,0) q $g(@vals@("sidod")) "RTN","SAMIUR2",711,0) ; "RTN","SAMIUR2",712,0) INACTRE(zdt,dfn,SAMIPATS) ; inactive date "RTN","SAMIUR2",713,0) ; "RTN","SAMIUR2",714,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",715,0) ;@called-by "RTN","SAMIUR2",716,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",717,0) ;@calls "RTN","SAMIUR2",718,0) ; $$setroot^%wd "RTN","SAMIUR2",719,0) ; "RTN","SAMIUR2",720,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIUR2",721,0) new sid set sid=$get(@root@(dfn,"samistudyid")) "RTN","SAMIUR2",722,0) new siform set siform=$get(SAMIPATS(zdt,dfn,"siform")) "RTN","SAMIUR2",723,0) new vals set vals=$name(@root@("graph",sid,siform)) "RTN","SAMIUR2",724,0) ; "RTN","SAMIUR2",725,0) q $g(@vals@("sistachg")) "RTN","SAMIUR2",726,0) ; "RTN","SAMIUR2",727,0) INACTCM(zdt,dfn,SAMIPATS) ; inactive date "RTN","SAMIUR2",728,0) ; "RTN","SAMIUR2",729,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",730,0) ;@called-by "RTN","SAMIUR2",731,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",732,0) ;@calls "RTN","SAMIUR2",733,0) ; $$setroot^%wd "RTN","SAMIUR2",734,0) ; "RTN","SAMIUR2",735,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIUR2",736,0) new sid set sid=$get(@root@(dfn,"samistudyid")) "RTN","SAMIUR2",737,0) new siform set siform=$get(SAMIPATS(zdt,dfn,"siform")) "RTN","SAMIUR2",738,0) new vals set vals=$name(@root@("graph",sid,siform)) "RTN","SAMIUR2",739,0) ; "RTN","SAMIUR2",740,0) q $g(@vals@("sistreas")) "RTN","SAMIUR2",741,0) ; "RTN","SAMIUR2",742,0) LDE(zdt,dfn,SAMIPATS) ; last date and entry in com log "RTN","SAMIUR2",743,0) ; "RTN","SAMIUR2",744,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",745,0) ;@called-by "RTN","SAMIUR2",746,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",747,0) ;@calls "RTN","SAMIUR2",748,0) ; $$setroot^%wd "RTN","SAMIUR2",749,0) ; "RTN","SAMIUR2",750,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIUR2",751,0) new sid set sid=$get(@root@(dfn,"samistudyid")) "RTN","SAMIUR2",752,0) new siform set siform=$get(SAMIPATS(zdt,dfn,"siform")) "RTN","SAMIUR2",753,0) new vals set vals=$name(@root@("graph",sid,siform)) "RTN","SAMIUR2",754,0) ; "RTN","SAMIUR2",755,0) n comien,comdt,comntry "RTN","SAMIUR2",756,0) s (comdt,comntry)="" "RTN","SAMIUR2",757,0) s comien=$o(@vals@("comlog"," "),-1) "RTN","SAMIUR2",758,0) i comien="" d q comdt "RTN","SAMIUR2",759,0) . s comdt=$g(@vals@("sidc")) "RTN","SAMIUR2",760,0) s comntry=$g(@vals@("comlog",comien)) "RTN","SAMIUR2",761,0) s comdt=$p($p(comntry,"[",2),"@",1) "RTN","SAMIUR2",762,0) q comdt_"^"_comntry "RTN","SAMIUR2",763,0) ; "RTN","SAMIUR2",764,0) LDOC(zdt,dfn,SAMIPATS) ; last date of contact "RTN","SAMIUR2",765,0) ; "RTN","SAMIUR2",766,0) q $P($$LDE(zdt,dfn,.SAMIPATS),"^",1) "RTN","SAMIUR2",767,0) ; "RTN","SAMIUR2",768,0) LENTRY(zdt,dfn,SAMIPATS) ; last contact entry "RTN","SAMIUR2",769,0) ; "RTN","SAMIUR2",770,0) q $P($$LDE(zdt,dfn,.SAMIPATS),"^",2) "RTN","SAMIUR2",771,0) ; "RTN","SAMIUR2",772,0) ; "RTN","SAMIUR2",773,0) MANPAT(ien,dfn,SAMIPATS) ; unmatched patient cell "RTN","SAMIUR2",774,0) ; "RTN","SAMIUR2",775,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",776,0) ;@called-by "RTN","SAMIUR2",777,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",778,0) ;@calls "RTN","SAMIUR2",779,0) ; $$setroot^%wd "RTN","SAMIUR2",780,0) ; "RTN","SAMIUR2",781,0) new zcell set zcell="" "RTN","SAMIUR2",782,0) ; set zcell=zcell_$get(SAMIPATS(ien,dfn,"saminame")) "RTN","SAMIUR2",783,0) set zcell=zcell_$get(SAMIPATS(ien,dfn,"editref")) "RTN","SAMIUR2",784,0) set zcell=zcell_"<br>Date of Birth: "_$get(SAMIPATS(ien,dfn,"dob")) "RTN","SAMIUR2",785,0) set zcell=zcell_" Gender: "_$get(SAMIPATS(ien,dfn,"sex")) "RTN","SAMIUR2",786,0) ; "RTN","SAMIUR2",787,0) new ssn set ssn=$get(SAMIPATS(ien,dfn,"ssn")) "RTN","SAMIUR2",788,0) if ssn="" do ; "RTN","SAMIUR2",789,0) . new lroot set lroot=$$setroot^%wd("patient-lookup") "RTN","SAMIUR2",790,0) . new tssn set tssn=$get(@lroot@(ien,"ssn")) "RTN","SAMIUR2",791,0) . set ssn=$extract(tssn,1,3)_"-"_$extract(tssn,4,5)_"-"_$extract(tssn,6,9) "RTN","SAMIUR2",792,0) . quit "RTN","SAMIUR2",793,0) set zcell=zcell_"<br>SSN: "_ssn "RTN","SAMIUR2",794,0) ; "RTN","SAMIUR2",795,0) set zcell=zcell_"<br>dfn: "_dfn "RTN","SAMIUR2",796,0) ; "RTN","SAMIUR2",797,0) quit zcell ; end of ppi $$MANPAT^SAMIUR2 "RTN","SAMIUR2",798,0) ; "RTN","SAMIUR2",799,0) ; "RTN","SAMIUR2",800,0) ; "RTN","SAMIUR2",801,0) MATCH(ien,dfn,SAMIPATS) ; match button cell "RTN","SAMIUR2",802,0) ; "RTN","SAMIUR2",803,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",804,0) ;@called-by "RTN","SAMIUR2",805,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",806,0) ;@calls none "RTN","SAMIUR2",807,0) ; "RTN","SAMIUR2",808,0) new matien set matien=$get(SAMIPATS(ien,dfn,"MATCHLOG")) "RTN","SAMIUR2",809,0) quit:matien="" "" "RTN","SAMIUR2",810,0) ; "RTN","SAMIUR2",811,0) new nuhref set nuhref="<form method=POST action=""/vapals"">" "RTN","SAMIUR2",812,0) set nuhref=nuhref_"<input type=hidden name=""samiroute"" value=""merge"">" "RTN","SAMIUR2",813,0) set nuhref=nuhref_"<input type=hidden name=""toien"" value="_ien_">" "RTN","SAMIUR2",814,0) set nuhref=nuhref_"<input value=""Merge"" class=""btn btn-link"" role=""link"" type=""submit""></form>" "RTN","SAMIUR2",815,0) ; "RTN","SAMIUR2",816,0) quit nuhref ; end of ppi $$MATCH^SAMIUR2 "RTN","SAMIUR2",817,0) ; "RTN","SAMIUR2",818,0) ; "RTN","SAMIUR2",819,0) ; "RTN","SAMIUR2",820,0) NAME(zdt,dfn,SAMIPATS) ; name w/hyperlink "RTN","SAMIUR2",821,0) ; "RTN","SAMIUR2",822,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",823,0) ;@called-by "RTN","SAMIUR2",824,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",825,0) ;@calls none "RTN","SAMIUR2",826,0) ; "RTN","SAMIUR2",827,0) new nam set nam="Name" "RTN","SAMIUR2",828,0) ; "RTN","SAMIUR2",829,0) quit $get(SAMIPATS(zdt,dfn,"nuhref")) ; end of ppi $$NAME^SAMIUR2 "RTN","SAMIUR2",830,0) ; "RTN","SAMIUR2",831,0) ; "RTN","SAMIUR2",832,0) ; "RTN","SAMIUR2",833,0) PACKYRS(zdt,dfn,SAMIPATS) ; smoking status "RTN","SAMIUR2",834,0) ; "RTN","SAMIUR2",835,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",836,0) ;@called-by "RTN","SAMIUR2",837,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",838,0) ;@calls "RTN","SAMIUR2",839,0) ; $$setroot^%wd "RTN","SAMIUR2",840,0) ; "RTN","SAMIUR2",841,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIUR2",842,0) new sid set sid=$get(@root@(dfn,"samistudyid")) "RTN","SAMIUR2",843,0) new siform set siform=$get(SAMIPATS(zdt,dfn,"siform")) "RTN","SAMIUR2",844,0) new vals set vals=$name(@root@("graph",sid,siform)) "RTN","SAMIUR2",845,0) new pkyrs set pkyrs=$get(@vals@("sippy")) "RTN","SAMIUR2",846,0) ; "RTN","SAMIUR2",847,0) quit pkyrs ; end of ppi $$PACKYRS^SAMIUR2 "RTN","SAMIUR2",848,0) ; "RTN","SAMIUR2",849,0) ; "RTN","SAMIUR2",850,0) ; "RTN","SAMIUR2",851,0) POSSIBLE(ien,dfn,SAMIPATS) ; possible match cell "RTN","SAMIUR2",852,0) ; "RTN","SAMIUR2",853,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",854,0) ;@called-by "RTN","SAMIUR2",855,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",856,0) ;@calls "RTN","SAMIUR2",857,0) ; $$setroot^%wd "RTN","SAMIUR2",858,0) ; "RTN","SAMIUR2",859,0) new zcell set zcell="" "RTN","SAMIUR2",860,0) new matien set matien=$get(SAMIPATS(ien,dfn,"MATCHLOG")) "RTN","SAMIUR2",861,0) quit:matien="" zcell "RTN","SAMIUR2",862,0) ; "RTN","SAMIUR2",863,0) new lroot set lroot=$$setroot^%wd("patient-lookup") "RTN","SAMIUR2",864,0) quit:'$data(@lroot@(matien)) zcell "RTN","SAMIUR2",865,0) ; "RTN","SAMIUR2",866,0) set zcell=zcell_$get(@lroot@(matien,"saminame")) "RTN","SAMIUR2",867,0) set zcell=zcell_"<br>Date of Birth: "_$get(@lroot@(matien,"sbdob")) "RTN","SAMIUR2",868,0) set zcell=zcell_" Gender: "_$get(@lroot@(matien,"sex")) "RTN","SAMIUR2",869,0) ; "RTN","SAMIUR2",870,0) new tssn set tssn=$get(@lroot@(matien,"ssn")) "RTN","SAMIUR2",871,0) new ssn set ssn=tssn "RTN","SAMIUR2",872,0) if tssn'["-" set ssn=$extract(tssn,1,3)_"-"_$extract(tssn,4,5)_"-"_$extract(tssn,6,9) "RTN","SAMIUR2",873,0) set zcell=zcell_"<br>SSN: "_ssn "RTN","SAMIUR2",874,0) ; "RTN","SAMIUR2",875,0) set zcell=zcell_"<br>dfn: "_$get(@lroot@(matien,"dfn")) "RTN","SAMIUR2",876,0) ; "RTN","SAMIUR2",877,0) quit zcell ; end of ppi $$POSSIBLE^SAMIUR2 "RTN","SAMIUR2",878,0) ; "RTN","SAMIUR2",879,0) ; "RTN","SAMIUR2",880,0) ; "RTN","SAMIUR2",881,0) RECOM(zdt,dfn,SAMIPATS) ; recommendation "RTN","SAMIUR2",882,0) ; "RTN","SAMIUR2",883,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",884,0) ;@called-by "RTN","SAMIUR2",885,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",886,0) ;@calls "RTN","SAMIUR2",887,0) ; $$setroot^%wd "RTN","SAMIUR2",888,0) ; "RTN","SAMIUR2",889,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIUR2",890,0) new ceform set ceform=$get(SAMIPATS(zdt,dfn,"ceform")) "RTN","SAMIUR2",891,0) quit:ceform="" "" "RTN","SAMIUR2",892,0) ; "RTN","SAMIUR2",893,0) new sid set sid=$get(@root@(dfn,"samistudyid")) "RTN","SAMIUR2",894,0) new vals set vals=$name(@root@("graph",sid,ceform)) "RTN","SAMIUR2",895,0) new cefuw set cefuw=$get(@vals@("cefuw")) "RTN","SAMIUR2",896,0) ; "RTN","SAMIUR2",897,0) new recom set recom="" "RTN","SAMIUR2",898,0) set recom=$select(cefuw="1y":"Annual Repeat",cefuw="nw":"Now",cefuw="1m":"1 month",cefuw="3m":"3 months",cefuw="6m":"6 months",cefuw="os":"Other",1:"") "RTN","SAMIUR2",899,0) if $get(@vals@("cefuaf"))="y" set recom=recom_", Antibiotics" "RTN","SAMIUR2",900,0) if $get(@vals@("cefucc"))="y" set recom=recom_", Contrast CT" "RTN","SAMIUR2",901,0) if $get(@vals@("cefupe"))="y" set recom=recom_", PET" "RTN","SAMIUR2",902,0) if $get(@vals@("cefufn"))="y" set recom=recom_", Percutaneous biopsy" "RTN","SAMIUR2",903,0) if $get(@vals@("cefubr"))="y" set recom=recom_", Bronchoscopy" "RTN","SAMIUR2",904,0) if $get(@vals@("cefupc"))="y" set recom=recom_", Pulmonary consultation" "RTN","SAMIUR2",905,0) if $get(@vals@("cefutb"))="y" set recom=recom_", Refer to tumor board" "RTN","SAMIUR2",906,0) if $get(@vals@("cefunf"))="y" set recom=recom_", No other further follow-up" "RTN","SAMIUR2",907,0) if $extract(recom,1,2)=", " set recom=$extract(recom,3,$length(recom)) "RTN","SAMIUR2",908,0) ; "RTN","SAMIUR2",909,0) quit recom ; end of ppi $$RECOM^SAMIUR2 "RTN","SAMIUR2",910,0) ; "RTN","SAMIUR2",911,0) ; "RTN","SAMIUR2",912,0) ; "RTN","SAMIUR2",913,0) RURAL(zdt,dfn,SAMIPATS) ; patient's rural/urban status "RTN","SAMIUR2",914,0) ; "RTN","SAMIUR2",915,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",916,0) ;@called-by "RTN","SAMIUR2",917,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",918,0) ;@calls "RTN","SAMIUR2",919,0) ; $$setroot^%wd "RTN","SAMIUR2",920,0) ; "RTN","SAMIUR2",921,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIUR2",922,0) new sid set sid=$get(@root@(dfn,"samistudyid")) "RTN","SAMIUR2",923,0) new siform set siform=$get(SAMIPATS(zdt,dfn,"siform")) "RTN","SAMIUR2",924,0) new vals set vals=$name(@root@("graph",sid,siform)) "RTN","SAMIUR2",925,0) new sirs set sirs=$get(@vals@("sirs")) "RTN","SAMIUR2",926,0) set sirs=$select(sirs="r":"rural",sirs="u":"urban",sirs="n":"unknown",1:"unknown") "RTN","SAMIUR2",927,0) ; "RTN","SAMIUR2",928,0) quit sirs ; end of ppi $$RURAL^SAMIUR2 "RTN","SAMIUR2",929,0) ; "RTN","SAMIUR2",930,0) ; "RTN","SAMIUR2",931,0) ; "RTN","SAMIUR2",932,0) SID(zdt,dfn,SAMIPATS) ; study ID "RTN","SAMIUR2",933,0) ; "RTN","SAMIUR2",934,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",935,0) ;@called-by "RTN","SAMIUR2",936,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",937,0) ;@calls "RTN","SAMIUR2",938,0) ; $$DFN2SID "RTN","SAMIUR2",939,0) ; "RTN","SAMIUR2",940,0) quit $$DFN2SID(dfn) ; end of ppi $$SID^SAMIUR2 "RTN","SAMIUR2",941,0) ; "RTN","SAMIUR2",942,0) ; "RTN","SAMIUR2",943,0) ; "RTN","SAMIUR2",944,0) SMHIS(zdt,dfn,SAMIPATS) ; smoking history cell "RTN","SAMIUR2",945,0) ; "RTN","SAMIUR2",946,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",947,0) ;@called-by "RTN","SAMIUR2",948,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",949,0) ;@calls "RTN","SAMIUR2",950,0) ; $$DFN2SID "RTN","SAMIUR2",951,0) ; $$SHDET "RTN","SAMIUR2",952,0) ; "RTN","SAMIUR2",953,0) new zrtn set zrtn="" "RTN","SAMIUR2",954,0) set zrtn=zrtn_"<div class=""row""><div class=""col-md-12""><table class=""table"" id=""pack-years-history"">" "RTN","SAMIUR2",955,0) set zrtn=zrtn_"<thead><tr><th>Form </th><th> Reported Date </th>" "RTN","SAMIUR2",956,0) set zrtn=zrtn_"<th>Pack Years</th><th>Cumulative</th></tr></thead><tbody>" "RTN","SAMIUR2",957,0) set zrtn=zrtn_$$SHDET($$DFN2SID(dfn)) "RTN","SAMIUR2",958,0) set zrtn=zrtn_"</tbody></table></div></div>" "RTN","SAMIUR2",959,0) ; "RTN","SAMIUR2",960,0) quit zrtn ; end of ppi $$SMHIS^SAMIUR2 "RTN","SAMIUR2",961,0) ; "RTN","SAMIUR2",962,0) ; "RTN","SAMIUR2",963,0) ; "RTN","SAMIUR2",964,0) SMKSTAT(zdt,dfn,SAMIPATS) ; smoking status "RTN","SAMIUR2",965,0) ; "RTN","SAMIUR2",966,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",967,0) ;@called-by "RTN","SAMIUR2",968,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",969,0) ;@calls "RTN","SAMIUR2",970,0) ; $$setroot^%wd "RTN","SAMIUR2",971,0) ; "RTN","SAMIUR2",972,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIUR2",973,0) new sid set sid=$get(@root@(dfn,"samistudyid")) "RTN","SAMIUR2",974,0) new siform set siform=$get(SAMIPATS(zdt,dfn,"siform")) "RTN","SAMIUR2",975,0) new vals set vals=$name(@root@("graph",sid,siform)) "RTN","SAMIUR2",976,0) ; "RTN","SAMIUR2",977,0) new smk set smk="unknown" "RTN","SAMIUR2",978,0) if $get(@vals@("siesm"))="n" set smk="Never smoked" "RTN","SAMIUR2",979,0) if $get(@vals@("siesm"))="p" set smk="Past smoker" "RTN","SAMIUR2",980,0) if $get(@vals@("siesm"))="c" set smk="Current smoker" "RTN","SAMIUR2",981,0) ; if $get(@vals@("siesq"))=1 set smk="Cu" "RTN","SAMIUR2",982,0) ; "RTN","SAMIUR2",983,0) quit smk ; end of ppi $$SMKSTAT^SAMIUR2 "RTN","SAMIUR2",984,0) ; "RTN","SAMIUR2",985,0) ; "RTN","SAMIUR2",986,0) ; "RTN","SAMIUR2",987,0) SSN(zdt,dfn,SAMIPATS) ; social security number "RTN","SAMIUR2",988,0) ; "RTN","SAMIUR2",989,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",990,0) ;@called-by "RTN","SAMIUR2",991,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",992,0) ;@calls none "RTN","SAMIUR2",993,0) ; "RTN","SAMIUR2",994,0) new tssn set tssn=$get(SAMIPATS(zdt,dfn,"ssn")) "RTN","SAMIUR2",995,0) new ssn set ssn=tssn "RTN","SAMIUR2",996,0) if ssn'["-" do "RTN","SAMIUR2",997,0) . set ssn=$extract(tssn,1,3)_"-"_$extract(tssn,4,5)_"-"_$extract(tssn,6,9) "RTN","SAMIUR2",998,0) . quit "RTN","SAMIUR2",999,0) ; "RTN","SAMIUR2",1000,0) quit ssn ; end of ppi $$SSN^SAMIUR2 "RTN","SAMIUR2",1001,0) ; "RTN","SAMIUR2",1002,0) ; "RTN","SAMIUR2",1003,0) SSNLABEL(SITE) ; extrinsic returns label for SSN (ie PID) "RTN","SAMIUR2",1004,0) new RTN "RTN","SAMIUR2",1005,0) set RTN=$$GET1PARM^SAMIPARM("socialSecurityNumber",SITE) "RTN","SAMIUR2",1006,0) if RTN="" set RTN="SSN" "RTN","SAMIUR2",1007,0) quit RTN "RTN","SAMIUR2",1008,0) ; "RTN","SAMIUR2",1009,0) ; "RTN","SAMIUR2",1010,0) STUDYDT(zdt,dfn,SAMIPATS) ; latest study date "RTN","SAMIUR2",1011,0) ; "RTN","SAMIUR2",1012,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",1013,0) ;@called-by "RTN","SAMIUR2",1014,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",1015,0) ;@calls none "RTN","SAMIUR2",1016,0) ; "RTN","SAMIUR2",1017,0) new stdt set stdt=$get(SAMIPATS(zdt,dfn,"cedos")) "RTN","SAMIUR2",1018,0) ; "RTN","SAMIUR2",1019,0) quit stdt ; end of ppi $$STUDYDT^SAMIUR2 "RTN","SAMIUR2",1020,0) ; "RTN","SAMIUR2",1021,0) ; "RTN","SAMIUR2",1022,0) ; "RTN","SAMIUR2",1023,0) STUDYTYP(zdt,dfn,SAMIPATS) ; latest study type "RTN","SAMIUR2",1024,0) ; "RTN","SAMIUR2",1025,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",1026,0) ;@called-by "RTN","SAMIUR2",1027,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",1028,0) ;@calls "RTN","SAMIUR2",1029,0) ; $$setroot^%wd "RTN","SAMIUR2",1030,0) ; "RTN","SAMIUR2",1031,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIUR2",1032,0) new ceform set ceform=$get(SAMIPATS(zdt,dfn,"ceform")) "RTN","SAMIUR2",1033,0) quit:ceform="" "" "RTN","SAMIUR2",1034,0) ; "RTN","SAMIUR2",1035,0) new sid set sid=$get(@root@(dfn,"samistudyid")) "RTN","SAMIUR2",1036,0) new vals set vals=$name(@root@("graph",sid,ceform)) "RTN","SAMIUR2",1037,0) new stypx set stypx=$get(@vals@("cetex")) "RTN","SAMIUR2",1038,0) new styp set styp=$select(stypx="a":"Annual",stypx="b":"Baseline",stypx="d":"Followup",1:"") "RTN","SAMIUR2",1039,0) ; "RTN","SAMIUR2",1040,0) quit styp ; end of ppi $$STUDYTYP^SAMIUR2 "RTN","SAMIUR2",1041,0) ; "RTN","SAMIUR2",1042,0) ; "RTN","SAMIUR2",1043,0) ; "RTN","SAMIUR2",1044,0) VALS(zdt,dfn,SAMIPATS) ; form-values cell "RTN","SAMIUR2",1045,0) ; "RTN","SAMIUR2",1046,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",1047,0) ;@called-by "RTN","SAMIUR2",1048,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",1049,0) ;@calls "RTN","SAMIUR2",1050,0) ; $$DFN2SID "RTN","SAMIUR2",1051,0) ; "RTN","SAMIUR2",1052,0) new vrtn set vrtn="" "RTN","SAMIUR2",1053,0) new vsid set vsid=$$DFN2SID(dfn) "RTN","SAMIUR2",1054,0) new vgr set vgr="/vals?sid="_vsid_"&form=" "RTN","SAMIUR2",1055,0) quit:'$data(SAMIPATS) "RTN","SAMIUR2",1056,0) ; "RTN","SAMIUR2",1057,0) new vzi set vzi="" "RTN","SAMIUR2",1058,0) for do quit:vzi="sort" quit:vzi="" "RTN","SAMIUR2",1059,0) . set vzi=$order(SAMIPATS(zdt,dfn,"items",vzi)) "RTN","SAMIUR2",1060,0) . quit:vzi="sort" "RTN","SAMIUR2",1061,0) . quit:vzi="" "RTN","SAMIUR2",1062,0) . set vrtn=vrtn_"<a href="""_vgr_vzi_""">"_vzi_"</a><br>" "RTN","SAMIUR2",1063,0) . quit "RTN","SAMIUR2",1064,0) ; "RTN","SAMIUR2",1065,0) quit vrtn ; end of $$VALS^SAMIUR2 "RTN","SAMIUR2",1066,0) ; "RTN","SAMIUR2",1067,0) ; "RTN","SAMIUR2",1068,0) ; "RTN","SAMIUR2",1069,0) WHEN(zdt,dfn,SAMIPATS) ; followup text "RTN","SAMIUR2",1070,0) ; "RTN","SAMIUR2",1071,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",1072,0) ;@called-by "RTN","SAMIUR2",1073,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",1074,0) ;@calls "RTN","SAMIUR2",1075,0) ; $$setroot^%wd "RTN","SAMIUR2",1076,0) ; "RTN","SAMIUR2",1077,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIUR2",1078,0) new ceform set ceform=$get(SAMIPATS(zdt,dfn,"ceform")) "RTN","SAMIUR2",1079,0) quit:ceform="" "" "RTN","SAMIUR2",1080,0) ; "RTN","SAMIUR2",1081,0) new sid set sid=$get(@root@(dfn,"samistudyid")) "RTN","SAMIUR2",1082,0) new vals set vals=$name(@root@("graph",sid,ceform)) "RTN","SAMIUR2",1083,0) new whnx set whnx=$get(@vals@("cefuw")) "RTN","SAMIUR2",1084,0) quit:whnx="" "" "RTN","SAMIUR2",1085,0) ; "RTN","SAMIUR2",1086,0) new DICT "RTN","SAMIUR2",1087,0) set DICT("cefuw","1m")="in one month" "RTN","SAMIUR2",1088,0) set DICT("cefuw","1y")="in one year" "RTN","SAMIUR2",1089,0) set DICT("cefuw","3m")="in three months" "RTN","SAMIUR2",1090,0) set DICT("cefuw","6m")="in six months" "RTN","SAMIUR2",1091,0) set DICT("cefuw","os")="other as specified" "RTN","SAMIUR2",1092,0) set whn=$get(DICT("cefuw",whnx)) "RTN","SAMIUR2",1093,0) ; "RTN","SAMIUR2",1094,0) quit whn ; end of ppi $$WHEN^SAMIUR2 "RTN","SAMIUR2",1095,0) ; "RTN","SAMIUR2",1096,0) ; "RTN","SAMIUR2",1097,0) ; "RTN","SAMIUR2",1098,0) WORKPAT(ien,dfn,SAMIPATS) ; worklist patient name cell "RTN","SAMIUR2",1099,0) ; "RTN","SAMIUR2",1100,0) ;;ppi;function;clean;silent;sac "RTN","SAMIUR2",1101,0) ;@called-by "RTN","SAMIUR2",1102,0) ; WSREPORT^SAMIUR "RTN","SAMIUR2",1103,0) ;@calls none "RTN","SAMIUR2",1104,0) ; "RTN","SAMIUR2",1105,0) new zcell set zcell="" "RTN","SAMIUR2",1106,0) set zcell=zcell_$get(SAMIPATS(ien,dfn,"workref")) "RTN","SAMIUR2",1107,0) ; "RTN","SAMIUR2",1108,0) quit zcell ; end of ppi $$WORKPAT^SAMIUR2 "RTN","SAMIUR2",1109,0) ; "RTN","SAMIUR2",1110,0) ; "RTN","SAMIUR2",1111,0) ; "RTN","SAMIUR2",1112,0) ;@section 5 unused subroutines "RTN","SAMIUR2",1113,0) ; "RTN","SAMIUR2",1114,0) ; "RTN","SAMIUR2",1115,0) ; "RTN","SAMIUR2",1116,0) EPAT(ien,dfn,SAMIPATS) ; patient name w/nav to enrollment "RTN","SAMIUR2",1117,0) ; "RTN","SAMIUR2",1118,0) ;;private;procedure;clean;silent;sac "RTN","SAMIUR2",1119,0) ;@called-by none "RTN","SAMIUR2",1120,0) ;@calls none "RTN","SAMIUR2",1121,0) ; "RTN","SAMIUR2",1122,0) quit ; end of $$EPAT "RTN","SAMIUR2",1123,0) ; "RTN","SAMIUR2",1124,0) ; "RTN","SAMIUR2",1125,0) ; "RTN","SAMIUR2",1126,0) ETHNCTY(zdt,dfn,SAMIPATS) ; ethnicity "RTN","SAMIUR2",1127,0) ; "RTN","SAMIUR2",1128,0) ;;private;function;clean;silent;sac "RTN","SAMIUR2",1129,0) ;@called-by none "RTN","SAMIUR2",1130,0) ;@calls none "RTN","SAMIUR2",1131,0) ; "RTN","SAMIUR2",1132,0) quit "ethnicity" ; end of $$ETHNCTY "RTN","SAMIUR2",1133,0) ; "RTN","SAMIUR2",1134,0) ; "RTN","SAMIUR2",1135,0) ; "RTN","SAMIUR2",1136,0) RACE(zdt,dfn,SAMIPATS) ; race "RTN","SAMIUR2",1137,0) ; "RTN","SAMIUR2",1138,0) ;;private;function;clean;silent;sac "RTN","SAMIUR2",1139,0) ;@called-by none [call commented out in RPTTBL] "RTN","SAMIUR2",1140,0) ;@calls "RTN","SAMIUR2",1141,0) ; $$setroot^%wd "RTN","SAMIUR2",1142,0) ; "RTN","SAMIUR2",1143,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIUR2",1144,0) new race set race=$get(@root@(dfn,"race")) "RTN","SAMIUR2",1145,0) ; "RTN","SAMIUR2",1146,0) quit race ; end of $$RACE "RTN","SAMIUR2",1147,0) ; "RTN","SAMIUR2",1148,0) ; "RTN","SAMIUR2",1149,0) ; "RTN","SAMIUR2",1150,0) STATUS(zdt,dfn,SAMIPATS) ; patient status "RTN","SAMIUR2",1151,0) ; "RTN","SAMIUR2",1152,0) ;;private;function;clean;silent;sac "RTN","SAMIUR2",1153,0) ;@called-by none "RTN","SAMIUR2",1154,0) ;@calls "RTN","SAMIUR2",1155,0) ; $$setroot^%wd "RTN","SAMIUR2",1156,0) ; "RTN","SAMIUR2",1157,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIUR2",1158,0) new sid set sid=$get(@root@(dfn,"samistudyid")) "RTN","SAMIUR2",1159,0) new siform set siform=$get(SAMIPATS(zdt,dfn,"siform")) "RTN","SAMIUR2",1160,0) new vals set vals=$name(@root@("graph",sid,siform)) "RTN","SAMIUR2",1161,0) new stat set stat=$get(@vals@("sistatus")) "RTN","SAMIUR2",1162,0) ; "RTN","SAMIUR2",1163,0) quit stat ; end of $$STATUS "RTN","SAMIUR2",1164,0) ; "RTN","SAMIUR2",1165,0) ; "RTN","SAMIUR2",1166,0) ; "RTN","SAMIUR2",1167,0) WSVALS(RTN,FILTER) ; display form values from graph "RTN","SAMIUR2",1168,0) ; "RTN","SAMIUR2",1169,0) ;;web service;procedure;clean;silent;sac "RTN","SAMIUR2",1170,0) ;@called-by none "RTN","SAMIUR2",1171,0) ;@calls "RTN","SAMIUR2",1172,0) ; $$setroot^%wd "RTN","SAMIUR2",1173,0) ; wsGtree^SYNVPR "RTN","SAMIUR2",1174,0) ; "RTN","SAMIUR2",1175,0) new root set root=$$setroot^%wd("vapals-patients") "RTN","SAMIUR2",1176,0) new sid set sid=$get(FILTER("sid")) "RTN","SAMIUR2",1177,0) if sid="" set sid=$get(FILTER("studyid")) "RTN","SAMIUR2",1178,0) quit:sid="" "RTN","SAMIUR2",1179,0) ; "RTN","SAMIUR2",1180,0) new zform set zform=$get(FILTER("form")) "RTN","SAMIUR2",1181,0) new groot "RTN","SAMIUR2",1182,0) if zform="" set groot=$name(@root@("graph",sid)) "RTN","SAMIUR2",1183,0) else set groot=$name(@root@("graph",sid,zform)) "RTN","SAMIUR2",1184,0) set FILTER("root")=$extract(groot,2,$length(groot)) "RTN","SAMIUR2",1185,0) ; "RTN","SAMIUR2",1186,0) do wsGtree^SYNVPR(.RTN,.FILTER) "RTN","SAMIUR2",1187,0) ; "RTN","SAMIUR2",1188,0) quit ; end of ws WSVALS^SAMIUR2 "RTN","SAMIUR2",1189,0) ; "RTN","SAMIUR2",1190,0) ; "RTN","SAMIUR2",1191,0) ; "RTN","SAMIUR2",1192,0) EOR ; end of routine SAMIUR2 "RTN","SAMIURUL") 0^22^B108116 "RTN","SAMIURUL",1,0) SAMIURUL ;ven/gpl - user reports log ;2021-07-14T18:25Z "RTN","SAMIURUL",2,0) ;;18.0;SAMI;**12**;2020-01;Build 6 "RTN","SAMIURUL",3,0) ;;1.18.0.12-t3+i12 "RTN","SAMIURUL",4,0) ; "RTN","SAMIURUL",5,0) ; SAMIURUL contains the development log & module documentation for "RTN","SAMIURUL",6,0) ; the VAPALS-ELCAP user-reports routines SAMIUR & SAMIUR2. "RTN","SAMIURUL",7,0) ; "RTN","SAMIURUL",8,0) quit ; no entry from top "RTN","SAMIURUL",9,0) ; "RTN","SAMIURUL",10,0) ; "RTN","SAMIURUL",11,0) ; "RTN","SAMIURUL",12,0) ;@section 0 primary development "RTN","SAMIURUL",13,0) ; "RTN","SAMIURUL",14,0) ; "RTN","SAMIURUL",15,0) ; "RTN","SAMIURUL",16,0) ;@routine-credits "RTN","SAMIURUL",17,0) ;@additional-dev Frederick D. S. Marshall (toad) "RTN","SAMIURUL",18,0) ; toad@vistaexpertise.net "RTN","SAMIURUL",19,0) ;@primary-dev-org Vista Expertise Network (ven) "RTN","SAMIURUL",20,0) ; http://vistaexpertise.net "RTN","SAMIURUL",21,0) ;@copyright 2021, mcglk & toad, all rights reserved "RTN","SAMIURUL",22,0) ;@license see routine SAMIUL "RTN","SAMIURUL",23,0) ; "RTN","SAMIURUL",24,0) ;@last-updated 2021-07-14T18:25Z "RTN","SAMIURUL",25,0) ;@application Screening Applications Management (SAM) "RTN","SAMIURUL",26,0) ;@module Screening Applications Management - IELCAP (SAMI) "RTN","SAMIURUL",27,0) ;@suite-of-files SAMI Forms (311.101-311.199) "RTN","SAMIURUL",28,0) ;@version 1.18.0.12-t3+i12 "RTN","SAMIURUL",29,0) ;@release-date 2020-01 "RTN","SAMIURUL",30,0) ;@patch-list **12** "RTN","SAMIURUL",31,0) ; "RTN","SAMIURUL",32,0) ;@additional-dev Frederick D. S. Marshall (toad) "RTN","SAMIURUL",33,0) ; toad@vistaexpertise.net "RTN","SAMIURUL",34,0) ;@additional-dev Kenneth McGlothlen (mcglk) "RTN","SAMIURUL",35,0) ; mcglk@vistaexpertise.net "RTN","SAMIURUL",36,0) ; "RTN","SAMIURUL",37,0) ;@module-credits "RTN","SAMIURUL",38,0) ;@project VA Partnership to Increase Access to Lung Screening "RTN","SAMIURUL",39,0) ; (VA-PALS) "RTN","SAMIURUL",40,0) ; http://va-pals.org/ "RTN","SAMIURUL",41,0) ;@funding 2017/2021, Bristol-Myers Squibb Foundation (bmsf) "RTN","SAMIURUL",42,0) ; https://www.bms.com/about-us/responsibility/bristol-myers-squibb-foundation.html "RTN","SAMIURUL",43,0) ;@partner-org Veterans Affairs Office of Rural health "RTN","SAMIURUL",44,0) ; https://www.ruralhealth.va.gov/ "RTN","SAMIURUL",45,0) ;@partner-org International Early Lung Cancer Action Program (I-ELCAP) "RTN","SAMIURUL",46,0) ; http://ielcap.com/ "RTN","SAMIURUL",47,0) ;@partner-org Paraxial Technologies (par) "RTN","SAMIURUL",48,0) ; http://paraxialtech.com/ "RTN","SAMIURUL",49,0) ;@partner-org Open Source Electronic Health Record Alliance (OSEHRA) "RTN","SAMIURUL",50,0) ; https://www.osehra.org/groups/va-pals-open-source-project-group "RTN","SAMIURUL",51,0) ; "RTN","SAMIURUL",52,0) ;@module-log repo github.com:VA-PALS-ELCAP/SAMI-VAPALS-ELCAP.git "RTN","SAMIURUL",53,0) ; "RTN","SAMIURUL",54,0) ; 2020-02-10/12 ven/gpl 1.18.0-t04 d543f7bb,f9869dfb,0e4d8b9a,5e67489 "RTN","SAMIURUL",55,0) ; SAMIUR,SAMIUR2: 1st version of revised user reports, progress on "RTN","SAMIURUL",56,0) ; user reports, fixed a bug in enrollment report, add rural/urban & "RTN","SAMIURUL",57,0) ; compute. "RTN","SAMIURUL",58,0) ; "RTN","SAMIURUL",59,0) ; 2020-02-18 ven/lgc 1.18.0-t04 76874314 "RTN","SAMIURUL",60,0) ; SAMIUR: update recently edited routines. "RTN","SAMIURUL",61,0) ; "RTN","SAMIURUL",62,0) ; 2020-03-10/12 ven/gpl 1.18.0-t04 8de06b06,4ad52d64 "RTN","SAMIURUL",63,0) ; SAMIUR: user report date filtering, fix end date logic in UR. "RTN","SAMIURUL",64,0) ; "RTN","SAMIURUL",65,0) ; 2019-03-24/28 ven/gpl 1.18.0 1fd4a4c,0cebb36 "RTN","SAMIURUL",66,0) ; SAMIUR2: revise incomplete form report, remove ethnicity from "RTN","SAMIURUL",67,0) ; enrollment report (we can't get it). "RTN","SAMIURUL",68,0) ; "RTN","SAMIURUL",69,0) ; 2020-04-16/23 ven/lgc 1.18.0-t04 e54b76d1b,89bffd3b "RTN","SAMIURUL",70,0) ; SAMIUR: SAMIFRM2 > SAMIFORM, SAMISUB2 > LOAD. "RTN","SAMIURUL",71,0) ; "RTN","SAMIURUL",72,0) ; 2019-05-08 ven/lgc 1.18.0 2172e51 "RTN","SAMIURUL",73,0) ; SAMIUR2: remove blank last line. "RTN","SAMIURUL",74,0) ; "RTN","SAMIURUL",75,0) ; 2019-06-21 par/dom 1.18.0 c6a4a57 VAP-352 "RTN","SAMIURUL",76,0) ; SAMIUR2: proper spelling of "follow up." "RTN","SAMIURUL",77,0) ; "RTN","SAMIURUL",78,0) ; 2019-08-03/04 ven/gpl 1.18.0 ffc94f6,d03557d,cd865e2b VPA-438 "RTN","SAMIURUL",79,0) ; SAMIUR: requested changes to followup report. "RTN","SAMIURUL",80,0) ; SAMIUR2: fix smoking status on enrollment report, fix change log "RTN","SAMIURUL",81,0) ; display, add pack years at intake to enrollment report, add "RTN","SAMIURUL",82,0) ; requested changes to followup report. "RTN","SAMIURUL",83,0) ; "RTN","SAMIURUL",84,0) ; 2019-09-26 ven/gpl 1.18.0 92b12324 VAP-420 "RTN","SAMIURUL",85,0) ; SAMIUR: add smoking history. "RTN","SAMIURUL",86,0) ; SAMIUR2: smoking history, new cummulative packyear processing. "RTN","SAMIURUL",87,0) ; "RTN","SAMIURUL",88,0) ; 2019-10-01 par/dom 1.18.0 4caf1a9 VAP-344 "RTN","SAMIURUL",89,0) ; SAMIUR2: make capitalization consistent. "RTN","SAMIURUL",90,0) ; "RTN","SAMIURUL",91,0) ; 2020-01-01/05 ven/arc 1.18.0 399f8547,62e3200f "RTN","SAMIURUL",92,0) ; SAMIUR: unmatched participant processing. "RTN","SAMIURUL",93,0) ; SAMIUR2: add unmatched patient processing. "RTN","SAMIURUL",94,0) ; "RTN","SAMIURUL",95,0) ; 2020-01-10 ven/gpl 1.18.0 1590577 "RTN","SAMIURUL",96,0) ; SAMIUR2: fix return on RACE^SAMIUR2 for cache. "RTN","SAMIURUL",97,0) ; "RTN","SAMIURUL",98,0) ; 2020-04-29/05-13 ven/gpl 1.18.0.5+i5 e8b8ea2d,61c7d208 "RTN","SAMIURUL",99,0) ; SAMIUR: fixes for reports, worklist functionality. "RTN","SAMIURUL",100,0) ; "RTN","SAMIURUL",101,0) ; 2020-05-13/14 ven/gpl 1.18.0.5+i5 61c7d20,b05df41 "RTN","SAMIURUL",102,0) ; SAMIUR2: add worklist functionality, fix gender & dob detection on "RTN","SAMIURUL",103,0) ; reports. "RTN","SAMIURUL",104,0) ; "RTN","SAMIURUL",105,0) ; 2021-03-22/23 ven/gpl 1.18.0.10+i10 256efe63,ba81b86a2 "RTN","SAMIURUL",106,0) ; SAMIUR: sort all reports by name, added row totals to reports. "RTN","SAMIURUL",107,0) ; "RTN","SAMIURUL",108,0) ; 2021-03-23 ven/toad 1.18.0.10+i10 96f461d0,af86e0eb "RTN","SAMIURUL",109,0) ; SAMIUR: add version info & dev log, lt refactor, fix XINDEX "RTN","SAMIURUL",110,0) ; errors. "RTN","SAMIURUL",111,0) ; "RTN","SAMIURUL",112,0) ; 2021-03-29 ven/gpl 1.18.0.11+i11 e809f2a2 "RTN","SAMIURUL",113,0) ; SAMIUR: prevent crash when reports have no matches: in WSREPORT "RTN","SAMIURUL",114,0) ; set SRT="" and uncomment zwrite SRT; in WKLIST add 2 commented-out "RTN","SAMIURUL",115,0) ; debugging lines. "RTN","SAMIURUL",116,0) ; "RTN","SAMIURUL",117,0) ; 2021-03-30 ven/toad 1.18.0.11+i11 7b14bb2 "RTN","SAMIURUL",118,0) ; SAMIUR: bump version, date, log; in WSREPORT comment zwrite SRT. "RTN","SAMIURUL",119,0) ; "RTN","SAMIURUL",120,0) ; 2021-03-31 ven/gpl 1.18.0.11+i11 66d89cd "RTN","SAMIURUL",121,0) ; SAMIUR: sort on all uppercase names for reports "RTN","SAMIURUL",122,0) ; "RTN","SAMIURUL",123,0) ; 2021-04-13 ven/gpl 1.18.0.11+i11 a12765b,f09ffef,fb399ab "RTN","SAMIURUL",124,0) ; SAMIUR: inactive report created. "RTN","SAMIURUL",125,0) ; SAMIUR2: in RPTTBL,GENDER create inactive report, move last exam "RTN","SAMIURUL",126,0) ; column on followup report, fix gender being blank in reports. "RTN","SAMIURUL",127,0) ; "RTN","SAMIURUL",128,0) ; 2021-05-20/25 ven/mcglk&toad 1.18.0.11+i11 "RTN","SAMIURUL",129,0) ; SAMIUR: annotate, lt refactor, bump version. "RTN","SAMIURUL",130,0) ; SAMIUR2: passim hdr comments, chg log, annotate, refactor, bump "RTN","SAMIURUL",131,0) ; version. "RTN","SAMIURUL",132,0) ; "RTN","SAMIURUL",133,0) ; 2021-05-29 ven/gpl 1.18.0.12-t2+i12 e6fd5730,a3d6f9a0 "RTN","SAMIURUL",134,0) ; SAMIUR,SAMIUR2 ssn params & matching report, update unmatched "RTN","SAMIURUL",135,0) ; report headings. "RTN","SAMIURUL",136,0) ; "RTN","SAMIURUL",137,0) ; 2021-06-15 ven/gpl 1.18.0.12-t2+i12 7e481426 "RTN","SAMIURUL",138,0) ; SAMIUR add site to editperson navigation. "RTN","SAMIURUL",139,0) ; "RTN","SAMIURUL",140,0) ; 2021-06-28 ven/gpl 1.18.0.12-t2+i12 df0aaea1,1137e2bb "RTN","SAMIURUL",141,0) ; SAMIUR change definition of inactive to not marked active, change "RTN","SAMIURUL",142,0) ; definition of active to marked active. "RTN","SAMIURUL",143,0) ; "RTN","SAMIURUL",144,0) ; 2021-07-06 ven/mcglk&toad&gpl 1.18.0.12-t2+i12 cbf7e46b,2d642aa4, "RTN","SAMIURUL",145,0) ; b248664b "RTN","SAMIURUL",146,0) ; SAMIURUL new routine for dev log. "RTN","SAMIURUL",147,0) ; SAMIUR,SAMIUR2,SAMIURUL move dev log & module docs to SAMIURUL, "RTN","SAMIURUL",148,0) ; bump version & dates. "RTN","SAMIURUL",149,0) ; SAMIUR in SELECT r/inactive w/status, test for active instead of "RTN","SAMIURUL",150,0) ; inactive. "RTN","SAMIURUL",151,0) ; "RTN","SAMIURUL",152,0) ; 2021-07-12 ven/gpl 1.18.0.12-t3+i12 60f4bb05,27c40485,d35bcb46 "RTN","SAMIURUL",153,0) ; SAMIUR: in WSREPORT,SORT add contact date & entry to missingct "RTN","SAMIURUL",154,0) ; report. "RTN","SAMIURUL",155,0) ; SAMIUR2: add contact date & entry to missingct report; add "RTN","SAMIURUL",156,0) ; inactive date reason & comment to inactive report; chg inactive "RTN","SAMIURUL",157,0) ; date to date of death. "RTN","SAMIURUL",158,0) ; "RTN","SAMIURUL",159,0) ; "RTN","SAMIURUL",160,0) ;@contents "RTN","SAMIURUL",161,0) ; SAMIUR user reports "RTN","SAMIURUL",162,0) ; SAMIUR2 user reports cont "RTN","SAMIURUL",163,0) ; SAMIURUL user reports log "RTN","SAMIURUL",164,0) ; "RTN","SAMIURUL",165,0) ; SAMIUR1 [to be added] "RTN","SAMIURUL",166,0) ; "RTN","SAMIURUL",167,0) ; "RTN","SAMIURUL",168,0) ; "RTN","SAMIURUL",169,0) EOR ; end of SAMIURUL "SEC","^DIC",311.12,311.12,0,"AUDIT") @ "SEC","^DIC",311.12,311.12,0,"DD") @ "SEC","^DIC",311.12,311.12,0,"DEL") @ "SEC","^DIC",311.12,311.12,0,"LAYGO") @ "SEC","^DIC",311.12,311.12,0,"RD") @ "SEC","^DIC",311.12,311.12,0,"WR") @ "SEC","^DIC",311.14,311.14,0,"AUDIT") @ "SEC","^DIC",311.14,311.14,0,"DD") @ "SEC","^DIC",311.14,311.14,0,"DEL") @ "SEC","^DIC",311.14,311.14,0,"LAYGO") @ "SEC","^DIC",311.14,311.14,0,"RD") @ "SEC","^DIC",311.14,311.14,0,"WR") @ "VER") 8.0^22.2 "^DD",311.12,311.12,0) FIELD^^.04^5 "^DD",311.12,311.12,0,"DT") 3210707 "^DD",311.12,311.12,0,"ID","W.02") W " ",$P(^(0),U,2) "^DD",311.12,311.12,0,"IX","B",311.12,.01) "^DD",311.12,311.12,0,"NM","SAMI SITE") "^DD",311.12,311.12,0,"VRPK") SAMI "^DD",311.12,311.12,.01,0) SITE^RP4'^DIC(4,^0;1^Q "^DD",311.12,311.12,.01,.1) SAMI SITE "^DD",311.12,311.12,.01,1,0) ^.1 "^DD",311.12,311.12,.01,1,1,0) 311.12^B "^DD",311.12,311.12,.01,1,1,1) S ^SAMI(311.12,"B",$E(X,1,30),DA)="" "^DD",311.12,311.12,.01,1,1,2) K ^SAMI(311.12,"B",$E(X,1,30),DA) "^DD",311.12,311.12,.01,3) NAME MUST BE 3-30 CHARACTERS, NOT NUMERIC OR STARTING WITH PUNCTUATION "^DD",311.12,311.12,.01,"DT") 3200325 "^DD",311.12,311.12,.02,0) SYMBOL^FJ3^^0;2^K:$L(X)>3!($L(X)<1) X "^DD",311.12,311.12,.02,.1) SITE SYMBOL "^DD",311.12,311.12,.02,3) Answer must be 1-3 characters in length. "^DD",311.12,311.12,.02,"DT") 3200407 "^DD",311.12,311.12,.03,0) ACTIVE^St11^^3;3^ "^DD",311.12,311.12,.03,.1) IS THE SITE ACTIVE "^DD",311.12,311.12,.03,"DT") 3200327 "^DD",311.12,311.12,.04,0) DEFAULT PARAMETERS^P311.14'^SAMI(311.14,^5;1^Q "^DD",311.12,311.12,.04,.1) PARAMETER DEFAULT "^DD",311.12,311.12,.04,"DT") 3210423 "^DD",311.12,311.12,1,0) PARMS^311.121^^4;0 "^DD",311.12,311.121,0) PARMS SUB-FIELD^^.02^2 "^DD",311.12,311.121,0,"DT") 3210419 "^DD",311.12,311.121,0,"IX","B",311.121,.01) "^DD",311.12,311.121,0,"NM","PARMS") "^DD",311.12,311.121,0,"UP") 311.12 "^DD",311.12,311.121,.01,0) PARM^MFJ30^^0;1^K:$L(X)>30!($L(X)<1) X "^DD",311.12,311.121,.01,.1) PARAMETER "^DD",311.12,311.121,.01,1,0) ^.1 "^DD",311.12,311.121,.01,1,1,0) 311.121^B "^DD",311.12,311.121,.01,1,1,1) S ^SAMI(311.12,DA(1),4,"B",$E(X,1,30),DA)="" "^DD",311.12,311.121,.01,1,1,2) K ^SAMI(311.12,DA(1),4,"B",$E(X,1,30),DA) "^DD",311.12,311.121,.01,3) Answer must be 1-30 characters in length. "^DD",311.12,311.121,.01,"DT") 3210423 "^DD",311.12,311.121,.02,0) VALUE^FJ180^^0;2^K:$L(X)>180!($L(X)<1) X "^DD",311.12,311.121,.02,.1) VALUE OF PARAMETER "^DD",311.12,311.121,.02,3) Answer must be 1-180 characters in length. "^DD",311.12,311.121,.02,"DT") 3210423 "^DD",311.14,311.14,0) FIELD^^1^2 "^DD",311.14,311.14,0,"DT") 3210707 "^DD",311.14,311.14,0,"IX","B",311.14,.01) "^DD",311.14,311.14,0,"NM","SAMI PARAMETER DEFAULTS") "^DD",311.14,311.14,0,"PT",311.12,.04) "^DD",311.14,311.14,0,"VRPK") SAMI "^DD",311.14,311.14,.01,0) NAME^RFJ30^^0;1^K:$L(X)>30!($L(X)<3)!'(X'?1P.E) X "^DD",311.14,311.14,.01,.1) DEFAULT PARAMETER SET NAME "^DD",311.14,311.14,.01,1,0) ^.1 "^DD",311.14,311.14,.01,1,1,0) 311.14^B "^DD",311.14,311.14,.01,1,1,1) S ^SAMI(311.14,"B",$E(X,1,30),DA)="" "^DD",311.14,311.14,.01,1,1,2) K ^SAMI(311.14,"B",$E(X,1,30),DA) "^DD",311.14,311.14,.01,3) Answer must be 3-30 characters in length. "^DD",311.14,311.14,.01,"DT") 3210419 "^DD",311.14,311.14,1,0) PARM^311.141^^1;0 "^DD",311.14,311.141,0) PARM SUB-FIELD^^.02^2 "^DD",311.14,311.141,0,"DT") 3210419 "^DD",311.14,311.141,0,"IX","B",311.141,.01) "^DD",311.14,311.141,0,"NM","PARM") "^DD",311.14,311.141,0,"UP") 311.14 "^DD",311.14,311.141,.01,0) PARM^MMFJ30^^0;1^K:$L(X)>30!($L(X)<1) X "^DD",311.14,311.141,.01,.1) PARAMETER NAME "^DD",311.14,311.141,.01,1,0) ^.1 "^DD",311.14,311.141,.01,1,1,0) 311.141^B "^DD",311.14,311.141,.01,1,1,1) S ^SAMI(311.14,DA(1),1,"B",$E(X,1,30),DA)="" "^DD",311.14,311.141,.01,1,1,2) K ^SAMI(311.14,DA(1),1,"B",$E(X,1,30),DA) "^DD",311.14,311.141,.01,3) Answer must be 1-30 characters in length. "^DD",311.14,311.141,.01,"DT") 3210420 "^DD",311.14,311.141,.02,0) VALUE^FJ180^^0;2^K:$L(X)>180!($L(X)<1) X "^DD",311.14,311.141,.02,.1) PARAMETER VALUE "^DD",311.14,311.141,.02,3) Answer must be 1-180 characters in length. "^DD",311.14,311.141,.02,"DT") 3210419 "^DIC",311.12,311.12,0) SAMI SITE^311.12 "^DIC",311.12,311.12,0,"GL") ^SAMI(311.12, "^DIC",311.12,311.12,"%",0) ^1.005^^0 "^DIC",311.12,"B","SAMI SITE",311.12) "^DIC",311.14,311.14,0) SAMI PARAMETER DEFAULTS^311.14 "^DIC",311.14,311.14,0,"GL") ^SAMI(311.14, "^DIC",311.14,"B","SAMI PARAMETER DEFAULTS",311.14) **END** **END**
Genshi
5
OSEHRA/SAMI-VAPALS-ELCAP
dist/18-12/t3/sami-1.18.0.12-t3-i12.kid
[ "Apache-2.0" ]
"""Collection of utilities for command-line interfaces and console scripts.""" import os import re numberAddedRE = re.compile(r"#\d+$") def makeOutputFileName(input, outputDir=None, extension=None, overWrite=False): """Generates a suitable file name for writing output. Often tools will want to take a file, do some kind of transformation to it, and write it out again. This function determines an appropriate name for the output file, through one or more of the following steps: - changing the output directory - replacing the file extension - suffixing the filename with a number (``#1``, ``#2``, etc.) to avoid overwriting an existing file. Args: input: Name of input file. outputDir: Optionally, a new directory to write the file into. extension: Optionally, a replacement for the current file extension. overWrite: Overwriting an existing file is permitted if true; if false and the proposed filename exists, a new name will be generated by adding an appropriate number suffix. Returns: str: Suitable output filename """ dirName, fileName = os.path.split(input) fileName, ext = os.path.splitext(fileName) if outputDir: dirName = outputDir fileName = numberAddedRE.split(fileName)[0] if extension is None: extension = os.path.splitext(input)[1] output = os.path.join(dirName, fileName + extension) n = 1 if not overWrite: while os.path.exists(output): output = os.path.join( dirName, fileName + "#" + repr(n) + extension) n += 1 return output
Python
5
13rianlucero/CrabAgePrediction
crabageprediction/venv/Lib/site-packages/fontTools/misc/cliTools.py
[ "MIT" ]
module Checker function truth = -> 42 function incr = |x| -> x + 1
Golo
2
golo-lang/golo-jmh-benchmarks
src/test/resources/snippets/golo/check.golo
[ "Apache-2.0" ]
$TTL 300 @ IN A 127.0.0.1 IN A 127.0.0.3 a IN A 127.0.0.2 b IN CNAME c.domain.tld. d IN A 127.0.0.4 e IN CNAME f.domain.tld. ssub IN A 127.0.0.7 j.ssub IN A 127.0.0.8 k.ssub IN CNAME l.ssub.domain.tld. ub IN A 127.0.0.5 g.ub IN A 127.0.0.6 h.ub IN CNAME i.ub.domain.tld.
DNS Zone
3
IT-Sumpfling/dnscontrol
pkg/js/parse_tests/031-dextendnames/domain.tld.zone
[ "MIT" ]
@ 3600 IN SOA ns1.fogflow.io. admin.fogflow.io. ( 2017042745 ; serial 7200 ; refresh (2 hours) 3600 ; retry (1 hour) 1209600 ; expire (2 weeks) 3600 ; minimum (1 hour) ) 3600 IN NS ns1.fogflow.io. 3600 IN NS ns2.fogflow.io. www IN A 35.234.89.72 cloud IN A 10.156.0.9 edge IN A 10.156.0.9
Io
3
jason-fox/fogflow
docker/core/https/local/dns/db.fogflow.io
[ "BSD-3-Clause" ]
%!PS-Adobe-3.0 %%Creator: graphviz version 2.38.0 (20140413.2041) %%Title: G %%Pages: (atend) %%BoundingBox: (atend) %%EndComments save %%BeginProlog /DotDict 200 dict def DotDict begin /setupLatin1 { mark /EncodingVector 256 array def EncodingVector 0 ISOLatin1Encoding 0 255 getinterval putinterval EncodingVector 45 /hyphen put % Set up ISO Latin 1 character encoding /starnetISO { dup dup findfont dup length dict begin { 1 index /FID ne { def }{ pop pop } ifelse } forall /Encoding EncodingVector def currentdict end definefont } def /Times-Roman starnetISO def /Times-Italic starnetISO def /Times-Bold starnetISO def /Times-BoldItalic starnetISO def /Helvetica starnetISO def /Helvetica-Oblique starnetISO def /Helvetica-Bold starnetISO def /Helvetica-BoldOblique starnetISO def /Courier starnetISO def /Courier-Oblique starnetISO def /Courier-Bold starnetISO def /Courier-BoldOblique starnetISO def cleartomark } bind def %%BeginResource: procset graphviz 0 0 /coord-font-family /Times-Roman def /default-font-family /Times-Roman def /coordfont coord-font-family findfont 8 scalefont def /InvScaleFactor 1.0 def /set_scale { dup 1 exch div /InvScaleFactor exch def scale } bind def % styles /solid { [] 0 setdash } bind def /dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def /dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def /invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def /bold { 2 setlinewidth } bind def /filled { } bind def /unfilled { } bind def /rounded { } bind def /diagonals { } bind def /tapered { } bind def % hooks for setting color /nodecolor { sethsbcolor } bind def /edgecolor { sethsbcolor } bind def /graphcolor { sethsbcolor } bind def /nopcolor {pop pop pop} bind def /beginpage { % i j npages /npages exch def /j exch def /i exch def /str 10 string def npages 1 gt { gsave coordfont setfont 0 0 moveto (\() show i str cvs show (,) show j str cvs show (\)) show grestore } if } bind def /set_font { findfont exch scalefont setfont } def % draw text fitted to its expected width /alignedtext { % width text /text exch def /width exch def gsave width 0 gt { [] 0 setdash text stringwidth pop width exch sub text length div 0 text ashow } if grestore } def /boxprim { % xcorner ycorner xsize ysize 4 2 roll moveto 2 copy exch 0 rlineto 0 exch rlineto pop neg 0 rlineto closepath } bind def /ellipse_path { /ry exch def /rx exch def /y exch def /x exch def matrix currentmatrix newpath x y translate rx ry scale 0 0 1 0 360 arc setmatrix } bind def /endpage { showpage } bind def /showpage { } def /layercolorseq [ % layer color sequence - darkest to lightest [0 0 0] [.2 .8 .8] [.4 .8 .8] [.6 .8 .8] [.8 .8 .8] ] def /layerlen layercolorseq length def /setlayer {/maxlayer exch def /curlayer exch def layercolorseq curlayer 1 sub layerlen mod get aload pop sethsbcolor /nodecolor {nopcolor} def /edgecolor {nopcolor} def /graphcolor {nopcolor} def } bind def /onlayer { curlayer ne {invis} if } def /onlayers { /myupper exch def /mylower exch def curlayer mylower lt curlayer myupper gt or {invis} if } def /curlayer 0 def %%EndResource %%EndProlog %%BeginSetup 14 default-font-family set_font 1 setmiterlimit % /arrowlength 10 def % /arrowwidth 5 def % make sure pdfmark is harmless for PS-interpreters other than Distiller /pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse % make '<<' and '>>' safe on PS Level 1 devices /languagelevel where {pop languagelevel}{1} ifelse 2 lt { userdict (<<) cvn ([) cvn load put userdict (>>) cvn ([) cvn load put } if %%EndSetup setupLatin1 %%Page: 1 1 %%PageBoundingBox: 36 36 463 753 %%PageOrientation: Portrait 0 0 1 beginpage gsave 36 36 427 717 boxprim clip newpath 1 1 set_scale 0 rotate 234.434 449.859 translate 0 0 0 graphcolor 24 /Times-Roman set_font -13.73 -399.06 moveto 58 (Neato) alignedtext % 0 gsave 1 setlinewidth 0 0 0 nodecolor -176.86 140.44 16.03 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font -180.36 136.74 moveto 7 (0) alignedtext grestore % 5 gsave 1 setlinewidth 0 0 0 nodecolor -128.86 217.46 16.03 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font -132.36 213.76 moveto 7 (5) alignedtext grestore % 0--5 gsave 1 setlinewidth 0 0 0 edgecolor newpath -168.05 154.57 moveto -159.4 168.46 -146.25 189.56 -137.61 203.42 curveto stroke grestore % 13 gsave 1 setlinewidth 0 0 0 nodecolor -136.1 70.45 21.43 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font -143.1 66.75 moveto 14 (13) alignedtext grestore % 0--13 gsave 1 setlinewidth 0 0 0 edgecolor newpath -168.61 126.28 moveto -161.72 114.45 -151.93 97.64 -144.9 85.56 curveto stroke grestore % 17 gsave 1 setlinewidth 0 0 0 nodecolor -36.01 224.63 21.43 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font -43.01 220.93 moveto 14 (17) alignedtext grestore % 5--17 gsave 1 setlinewidth 0 0 0 edgecolor newpath -112.26 218.74 moveto -96.93 219.92 -74.06 221.69 -57.37 222.98 curveto stroke grestore % 29 gsave 1 setlinewidth 0 0 0 nodecolor -173.22 282.68 21.43 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font -180.22 278.98 moveto 14 (29) alignedtext grestore % 5--29 gsave 1 setlinewidth 0 0 0 edgecolor newpath -138.05 230.97 moveto -145.36 241.72 -155.58 256.73 -163.11 267.82 curveto stroke grestore % 18 gsave 1 setlinewidth 0 0 0 nodecolor -52.92 114.48 21.43 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font -59.92 110.78 moveto 14 (18) alignedtext grestore % 13--18 gsave 1 setlinewidth 0 0 0 edgecolor newpath -118.46 79.79 moveto -104.34 87.26 -84.65 97.69 -70.54 105.16 curveto stroke grestore % 25 gsave 1 setlinewidth 0 0 0 nodecolor -172.37 -24.51 21.43 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font -179.37 -28.21 moveto 14 (25) alignedtext grestore % 13--25 gsave 1 setlinewidth 0 0 0 edgecolor newpath -142.09 54.77 moveto -148.81 37.17 -159.64 8.8 -166.37 -8.8 curveto stroke grestore % 1 gsave 1 setlinewidth 0 0 0 nodecolor 67.79 63.92 16.03 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font 64.29 60.22 moveto 7 (1) alignedtext grestore % 8 gsave 1 setlinewidth 0 0 0 nodecolor 21.95 -12.69 16.03 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font 18.45 -16.39 moveto 7 (8) alignedtext grestore % 1--8 gsave 1 setlinewidth 0 0 0 edgecolor newpath 59.38 49.87 moveto 51.11 36.05 38.55 15.07 30.3 1.27 curveto stroke grestore % 9 gsave 1 setlinewidth 0 0 0 nodecolor 26.24 145.92 16.03 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font 22.74 142.22 moveto 7 (9) alignedtext grestore % 1--9 gsave 1 setlinewidth 0 0 0 edgecolor newpath 60.36 78.58 moveto 52.8 93.51 41.14 116.51 33.6 131.38 curveto stroke grestore % 28 gsave 1 setlinewidth 0 0 0 nodecolor 148.97 30.77 21.43 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font 141.97 27.07 moveto 14 (28) alignedtext grestore % 1--28 gsave 1 setlinewidth 0 0 0 edgecolor newpath 83.05 57.69 moveto 96.37 52.25 115.75 44.33 130.05 38.49 curveto stroke grestore % 23 gsave 1 setlinewidth 0 0 0 nodecolor -37.64 -22.71 21.43 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font -44.64 -26.41 moveto 14 (23) alignedtext grestore % 8--23 gsave 1 setlinewidth 0 0 0 edgecolor newpath 5.67 -15.43 moveto -1.23 -16.59 -9.34 -17.95 -16.67 -19.18 curveto stroke grestore % 24 gsave 1 setlinewidth 0 0 0 nodecolor -45.4 -88.51 21.43 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font -52.4 -92.21 moveto 14 (24) alignedtext grestore % 8--24 gsave 1 setlinewidth 0 0 0 edgecolor newpath 11.13 -24.87 moveto -1 -38.52 -20.6 -60.59 -33.24 -74.82 curveto stroke grestore % 9--17 gsave 1 setlinewidth 0 0 0 edgecolor newpath 15.96 158.91 moveto 4.7 173.15 -13.29 195.9 -24.88 210.55 curveto stroke grestore % 14 gsave 1 setlinewidth 0 0 0 nodecolor 97.04 193.15 21.43 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font 90.04 189.45 moveto 14 (14) alignedtext grestore % 9--14 gsave 1 setlinewidth 0 0 0 edgecolor newpath 39.89 155.02 moveto 51.63 162.85 68.56 174.15 80.95 182.42 curveto stroke grestore % 9--18 gsave 1 setlinewidth 0 0 0 edgecolor newpath 10.98 139.86 moveto -1.87 134.75 -20.31 127.43 -34.08 121.97 curveto stroke grestore % 21 gsave 1 setlinewidth 0 0 0 nodecolor -18.34 176.44 21.43 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font -25.34 172.74 moveto 14 (21) alignedtext grestore % 9--21 gsave 1 setlinewidth 0 0 0 edgecolor newpath 12.62 155.24 moveto 7.91 158.47 2.59 162.11 -2.3 165.46 curveto stroke grestore % 2 gsave 1 setlinewidth 0 0 0 nodecolor -.22 -219.35 16.03 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font -3.72 -223.05 moveto 7 (2) alignedtext grestore % 7 gsave 1 setlinewidth 0 0 0 nodecolor -46.91 -151.82 16.03 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font -50.41 -155.52 moveto 7 (7) alignedtext grestore % 2--7 gsave 1 setlinewidth 0 0 0 edgecolor newpath -9.66 -205.69 moveto -17.77 -193.97 -29.38 -177.18 -37.47 -165.47 curveto stroke grestore % 10 gsave 1 setlinewidth 0 0 0 nodecolor 86.99 -205.93 21.43 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font 79.99 -209.63 moveto 14 (10) alignedtext grestore % 2--10 gsave 1 setlinewidth 0 0 0 edgecolor newpath 16.19 -216.83 moveto 30.3 -214.66 50.74 -211.51 66.03 -209.16 curveto stroke grestore % 12 gsave 1 setlinewidth 0 0 0 nodecolor -39.26 -290.13 21.43 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font -46.26 -293.83 moveto 14 (12) alignedtext grestore % 2--12 gsave 1 setlinewidth 0 0 0 edgecolor newpath -8.12 -233.68 moveto -14.71 -245.63 -24.09 -262.63 -30.83 -274.85 curveto stroke grestore % 19 gsave 1 setlinewidth 0 0 0 nodecolor 15.38 -99.74 21.43 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font 8.38 -103.44 moveto 14 (19) alignedtext grestore % 7--19 gsave 1 setlinewidth 0 0 0 edgecolor newpath -34.3 -141.28 moveto -24.21 -132.84 -10.03 -120.98 .6 -112.09 curveto stroke grestore % 7--24 gsave 1 setlinewidth 0 0 0 edgecolor newpath -46.52 -135.52 moveto -46.3 -126.14 -46.02 -114.39 -45.8 -104.98 curveto stroke grestore % 26 gsave 1 setlinewidth 0 0 0 nodecolor -119 -105.79 21.43 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font -126 -109.49 moveto 14 (26) alignedtext grestore % 7--26 gsave 1 setlinewidth 0 0 0 edgecolor newpath -60.81 -142.95 moveto -72.76 -135.32 -90 -124.3 -102.62 -116.25 curveto stroke grestore % 22 gsave 1 setlinewidth 0 0 0 nodecolor 140.88 -264.81 21.43 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font 133.88 -268.51 moveto 14 (22) alignedtext grestore % 10--22 gsave 1 setlinewidth 0 0 0 edgecolor newpath 99.22 -219.29 moveto 107.91 -228.79 119.56 -241.52 128.33 -251.1 curveto stroke grestore % 3 gsave 1 setlinewidth 0 0 0 nodecolor 99.15 -121.71 16.03 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font 95.65 -125.41 moveto 7 (3) alignedtext grestore % 3--10 gsave 1 setlinewidth 0 0 0 edgecolor newpath 96.81 -137.95 moveto 94.65 -152.86 91.48 -174.84 89.33 -189.74 curveto stroke grestore % 3--19 gsave 1 setlinewidth 0 0 0 edgecolor newpath 83.39 -117.57 moveto 69.84 -114.02 50.2 -108.87 35.51 -105.02 curveto stroke grestore % 20 gsave 1 setlinewidth 0 0 0 nodecolor 158.78 -56.03 21.43 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font 151.78 -59.73 moveto 14 (20) alignedtext grestore % 3--20 gsave 1 setlinewidth 0 0 0 edgecolor newpath 110.09 -109.66 moveto 120.31 -98.4 135.56 -81.6 146.26 -69.81 curveto stroke grestore % 19--23 gsave 1 setlinewidth 0 0 0 edgecolor newpath 5.4 -85.25 moveto -4.07 -71.48 -18.25 -50.88 -27.71 -37.13 curveto stroke grestore % 20--28 gsave 1 setlinewidth 0 0 0 edgecolor newpath 156.93 -39.7 moveto 155.18 -24.18 152.56 -.98 150.8 14.52 curveto stroke grestore % 4 gsave 1 setlinewidth 0 0 0 nodecolor 208.72 89.16 16.03 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font 205.22 85.46 moveto 7 (4) alignedtext grestore % 4--28 gsave 1 setlinewidth 0 0 0 edgecolor newpath 196.91 77.62 moveto 186.98 67.92 172.78 54.04 162.42 43.91 curveto stroke grestore % 15 gsave 1 setlinewidth 0 0 0 nodecolor 178.52 170.27 21.43 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font 171.52 166.57 moveto 14 (15) alignedtext grestore % 4--15 gsave 1 setlinewidth 0 0 0 edgecolor newpath 203.04 104.41 moveto 197.71 118.73 189.77 140.06 184.38 154.53 curveto stroke grestore % 6 gsave 1 setlinewidth 0 0 0 nodecolor -122.66 -10.4 16.03 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font -126.16 -14.1 moveto 7 (6) alignedtext grestore % 6--13 gsave 1 setlinewidth 0 0 0 edgecolor newpath -125.38 5.96 moveto -127.71 19.98 -131.05 40.09 -133.38 54.11 curveto stroke grestore % 6--23 gsave 1 setlinewidth 0 0 0 edgecolor newpath -106.27 -12.78 moveto -92.66 -14.75 -73.22 -17.56 -58.5 -19.69 curveto stroke grestore % 27 gsave 1 setlinewidth 0 0 0 nodecolor -23.33 52.18 21.43 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font -30.33 48.48 moveto 14 (27) alignedtext grestore % 23--27 gsave 1 setlinewidth 0 0 0 edgecolor newpath -34.53 -6.46 moveto -32.13 6.1 -28.83 23.41 -26.43 35.96 curveto stroke grestore % 24--26 gsave 1 setlinewidth 0 0 0 edgecolor newpath -65.91 -93.32 moveto -76.11 -95.72 -88.42 -98.61 -98.61 -101 curveto stroke grestore % 14--15 gsave 1 setlinewidth 0 0 0 edgecolor newpath 117.18 187.49 moveto 129.72 183.97 145.78 179.46 158.33 175.94 curveto stroke grestore % 18--21 gsave 1 setlinewidth 0 0 0 edgecolor newpath -44.55 129.48 moveto -39.2 139.08 -32.27 151.5 -26.88 161.15 curveto stroke grestore % 18--27 gsave 1 setlinewidth 0 0 0 edgecolor newpath -45.61 99.08 moveto -41.09 89.57 -35.31 77.4 -30.77 67.84 curveto stroke grestore % 11 gsave 1 setlinewidth 0 0 0 nodecolor -87.95 29.42 21.43 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font -94.95 25.72 moveto 14 (11) alignedtext grestore % 11--13 gsave 1 setlinewidth 0 0 0 edgecolor newpath -102.4 41.73 moveto -108.49 46.92 -115.57 52.95 -121.66 58.15 curveto stroke grestore % 11--23 gsave 1 setlinewidth 0 0 0 edgecolor newpath -75.26 16.27 moveto -67.69 8.42 -58.1 -1.5 -50.51 -9.38 curveto stroke grestore % 25--26 gsave 1 setlinewidth 0 0 0 edgecolor newpath -162.83 -39.04 moveto -153.17 -53.74 -138.33 -76.35 -128.64 -91.11 curveto stroke grestore % 16 gsave 1 setlinewidth 0 0 0 nodecolor 176.32 -331.6 21.43 16.03 ellipse_path stroke 0 0 0 nodecolor 14 /Times-Roman set_font 169.32 -335.3 moveto 14 (16) alignedtext grestore % 16--22 gsave 1 setlinewidth 0 0 0 edgecolor newpath 168.28 -316.44 moveto 162.48 -305.51 154.68 -290.82 148.89 -279.91 curveto stroke grestore endpage showpage grestore %%PageTrailer %%EndPage: 1 %%Trailer %%Pages: 1 %%BoundingBox: 36 36 463 753 end restore %%EOF
PostScript
3
ksemer/snap
test/graphviz/base_ungraph_Neato.ps
[ "BSD-3-Clause" ]
!include LogicLib.nsh !include Memento.nsh Name Memento OutFile Memento.exe XPStyle on ShowInstDetails show Page components Page instfiles RequestExecutionLevel user # settings !define MEMENTO_REGISTRY_ROOT HKCU !define MEMENTO_REGISTRY_KEY "Software\NSIS\Memento Test" # restore Function .onInit ${If} ${Cmd} `MessageBox MB_YESNO "Would you like to load an example state?" IDYES` DeleteRegKey HKCU "Software\NSIS\Memento Test" WriteRegStr HKCU "Software\NSIS\Memento Test" MementoSectionUsed "" WriteRegDWORD HKCU "Software\NSIS\Memento Test" MementoSection_sec_horse 1 WriteRegDWORD HKCU "Software\NSIS\Memento Test" MementoSection_sec_chicken 1 WriteRegDWORD HKCU "Software\NSIS\Memento Test" MementoSection_sec_donkey 0 WriteRegDWORD HKCU "Software\NSIS\Memento Test" MementoSection_sec_croc 0 ${EndIf} ${MementoSectionRestore} FunctionEnd # sections ${MementoSection} horse sec_horse ${MementoSectionEnd} ${MementoSection} donkey sec_donkey ${MementoSectionEnd} ${MementoSection} chicken sec_chicken ${MementoSectionEnd} SectionGroup /e group SectionGroup /e group ${MementoSection} croc sec_croc ${MementoSectionEnd} ${MementoSection} cow sec_cow ${MementoSectionEnd} SectionGroupEnd SectionGroupEnd ${MementoUnselectedSection} dinosaur sec_dinosaur ${MementoSectionEnd} # done... ${MementoSectionDone} # save Function .onInstSuccess ${MementoSectionSave} FunctionEnd
NSIS
4
vbillet/Torque3D
Engine/bin/tools/nsis/app/Examples/Memento.nsi
[ "MIT" ]
#pragma once #include "envoy/common/time.h" #include "envoy/stats/histogram.h" #include "envoy/stats/stats.h" #include "envoy/stats/timespan.h" namespace Envoy { namespace Stats { /** * An individual timespan that flushes its measured value to the histogram on completion. * The start time is captured on construction. The timespan must be * completed via complete() for it to be stored. If the timespan is deleted this will be treated as * a cancellation. The target histogram must represent a quantity of time. */ class HistogramCompletableTimespanImpl : public CompletableTimespan { public: HistogramCompletableTimespanImpl(Histogram& histogram, TimeSource& time_source); // Stats::CompletableTimespan std::chrono::milliseconds elapsed() const override; void complete() override; private: void ensureTimeHistogram(const Histogram& histogram) const; template <typename TimeUnit> TimeUnit elapsedDuration() const { return std::chrono::duration_cast<TimeUnit>(time_source_.monotonicTime() - start_); } uint64_t tickCount() const; TimeSource& time_source_; Histogram& histogram_; const MonotonicTime start_; }; } // namespace Stats } // namespace Envoy
C
5
dcillera/envoy
source/common/stats/timespan_impl.h
[ "Apache-2.0" ]
<html> <head> <title>Third Modal</title> </head> <body> <p>Modal dialog sample</p> <div> </div> </body> </html>
HTML
1
fracturesfei/angulardemo
node_modules/selenium-webdriver/lib/test/data/modal_dialogs/modal_3.html
[ "MIT" ]
echo [1 4] | length echo [2 3 5] | length
Nu
2
arbaregni/nushell
tests/fixtures/formats/script_multiline.nu
[ "MIT" ]
30 5 0 0 0 1 9 16 18 2 3 4 5 20 1 25 [0] [0] [0] [0] [0] [0] [0] [0] [0] 1 1 1 10 [7] 2 1 1 6 [3] 3 1 2 16 31 [-3] [7] 4 1 1 24 [2] 5 1 1 15 [0] 6 1 2 7 9 [6] [14] 7 1 1 22 [-6] 8 1 1 13 [-1] 9 1 1 19 [11] 10 1 3 29 7 17 [-1] [8] [8] 11 1 1 8 [6] 12 1 1 21 [-2] 13 1 3 22 28 30 [-12] [12] [8] 14 1 3 26 21 10 [10] [-8] [-27] 15 1 1 17 [9] 16 1 2 3 20 [-2] [-3] 17 1 1 23 [1] 18 1 1 25 [9] 19 1 1 27 [11] 20 1 1 18 [-6] 21 1 1 14 [0] 22 1 1 11 [-3] 23 1 1 12 [6] 24 1 1 31 [4] 25 1 1 31 [8] 26 1 1 31 [2] 27 1 2 31 19 [5] [-14] 28 1 1 31 [1] 29 1 1 31 [2] 30 1 2 13 31 [-16] [5] 31 1 0 0 1 0 0 0 0 0 0 1 1 6 1 2 0 0 0 2 1 1 1 0 0 3 2 3 1 7 1 3 0 0 3 4 1 2 0 4 1 1 0 5 1 3 0 0 3 0 0 6 1 6 1 3 0 0 0 7 1 9 0 0 3 2 4 8 1 2 5 4 4 5 0 9 1 6 0 0 0 4 0 10 1 3 1 0 0 0 0 11 1 6 3 0 0 2 0 12 1 8 4 4 1 5 4 13 1 7 3 3 5 5 5 14 1 4 3 0 4 1 0 15 1 4 1 0 5 3 5 16 1 6 4 0 0 1 3 17 1 3 0 4 3 0 1 18 1 5 0 0 4 4 0 19 1 4 0 1 0 2 0 20 1 10 0 0 0 4 0 21 1 1 0 3 4 0 4 22 1 7 1 0 4 2 5 23 1 4 3 0 0 0 1 24 1 4 2 4 2 3 0 25 1 8 0 5 0 0 5 26 1 2 0 0 0 0 4 27 1 5 0 1 0 0 4 28 1 1 0 2 0 0 0 29 1 2 5 4 0 0 0 30 1 5 5 0 0 0 0 31 1 0 0 0 0 0 0 6 7 8 8 9
Eagle
0
klorel/or-tools
examples/data/rcpsp/single_mode_max_delay/sm_j30/psp17.sch
[ "Apache-2.0" ]
<VirtualHost *:80> ServerAdmin webmaster@localhost Alias /Microsoft-Server-ActiveSync /var/www/html/index.php AliasMatch (?i)/Autodiscover/Autodiscover.xml "/var/www/html/autodiscover/autodiscover.php" DocumentRoot /var/www/html <Directory /var/www/html/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> </VirtualHost>
ApacheConf
3
camillebaronnet/zimbra-activesync-docker
default.vhost
[ "MIT" ]
%!PS-Adobe-3.0 % Produced by xpdf/pdftops 3.02 %%Creator: Microsoft\256 Office PowerPoint\256 2007 %%Title: Slide 1 %%LanguageLevel: 2 %%DocumentSuppliedResources: (atend) %%DocumentMedia: plain 612 792 0 () () %%BoundingBox: 0 0 612 792 %%Pages: 1 %%EndComments %%BeginDefaults %%PageMedia: plain %%EndDefaults %%BeginProlog %%BeginResource: procset xpdf 3.02 0 %%Copyright: Copyright 1996-2007 Glyph & Cog, LLC /xpdf 75 dict def xpdf begin % PDF special state /pdfDictSize 15 def /pdfSetup { 3 1 roll 2 array astore /setpagedevice where { pop 3 dict begin /PageSize exch def /ImagingBBox null def /Policies 1 dict dup begin /PageSize 3 def end def { /Duplex true def } if currentdict end setpagedevice } { pop pop } ifelse } def /pdfStartPage { pdfDictSize dict begin /pdfFillCS [] def /pdfFillXform {} def /pdfStrokeCS [] def /pdfStrokeXform {} def /pdfFill [0] def /pdfStroke [0] def /pdfFillOP false def /pdfStrokeOP false def /pdfLastFill false def /pdfLastStroke false def /pdfTextMat [1 0 0 1 0 0] def /pdfFontSize 0 def /pdfCharSpacing 0 def /pdfTextRender 0 def /pdfTextRise 0 def /pdfWordSpacing 0 def /pdfHorizScaling 1 def /pdfTextClipPath [] def } def /pdfEndPage { end } def % PDF color state /cs { /pdfFillXform exch def dup /pdfFillCS exch def setcolorspace } def /CS { /pdfStrokeXform exch def dup /pdfStrokeCS exch def setcolorspace } def /sc { pdfLastFill not { pdfFillCS setcolorspace } if dup /pdfFill exch def aload pop pdfFillXform setcolor /pdfLastFill true def /pdfLastStroke false def } def /SC { pdfLastStroke not { pdfStrokeCS setcolorspace } if dup /pdfStroke exch def aload pop pdfStrokeXform setcolor /pdfLastStroke true def /pdfLastFill false def } def /op { /pdfFillOP exch def pdfLastFill { pdfFillOP setoverprint } if } def /OP { /pdfStrokeOP exch def pdfLastStroke { pdfStrokeOP setoverprint } if } def /fCol { pdfLastFill not { pdfFillCS setcolorspace pdfFill aload pop pdfFillXform setcolor pdfFillOP setoverprint /pdfLastFill true def /pdfLastStroke false def } if } def /sCol { pdfLastStroke not { pdfStrokeCS setcolorspace pdfStroke aload pop pdfStrokeXform setcolor pdfStrokeOP setoverprint /pdfLastStroke true def /pdfLastFill false def } if } def % build a font /pdfMakeFont { 4 3 roll findfont 4 2 roll matrix scale makefont dup length dict begin { 1 index /FID ne { def } { pop pop } ifelse } forall /Encoding exch def currentdict end definefont pop } def /pdfMakeFont16 { exch findfont dup length dict begin { 1 index /FID ne { def } { pop pop } ifelse } forall /WMode exch def currentdict end definefont pop } def % graphics state operators /q { gsave pdfDictSize dict begin } def /Q { end grestore /pdfLastFill where { pop pdfLastFill { pdfFillOP setoverprint } { pdfStrokeOP setoverprint } ifelse } if } def /cm { concat } def /d { setdash } def /i { setflat } def /j { setlinejoin } def /J { setlinecap } def /M { setmiterlimit } def /w { setlinewidth } def % path segment operators /m { moveto } def /l { lineto } def /c { curveto } def /re { 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath } def /h { closepath } def % path painting operators /S { sCol stroke } def /Sf { fCol stroke } def /f { fCol fill } def /f* { fCol eofill } def % clipping operators /W { clip newpath } def /W* { eoclip newpath } def /Ws { strokepath clip newpath } def % text state operators /Tc { /pdfCharSpacing exch def } def /Tf { dup /pdfFontSize exch def dup pdfHorizScaling mul exch matrix scale pdfTextMat matrix concatmatrix dup 4 0 put dup 5 0 put exch findfont exch makefont setfont } def /Tr { /pdfTextRender exch def } def /Ts { /pdfTextRise exch def } def /Tw { /pdfWordSpacing exch def } def /Tz { /pdfHorizScaling exch def } def % text positioning operators /Td { pdfTextMat transform moveto } def /Tm { /pdfTextMat exch def } def % text string operators /cshow where { pop /cshow2 { dup { pop pop 1 string dup 0 3 index put 3 index exec } exch cshow pop pop } def }{ /cshow2 { currentfont /FontType get 0 eq { 0 2 2 index length 1 sub { 2 copy get exch 1 add 2 index exch get 2 copy exch 256 mul add 2 string dup 0 6 5 roll put dup 1 5 4 roll put 3 index exec } for } { dup { 1 string dup 0 3 index put 3 index exec } forall } ifelse pop pop } def } ifelse /awcp { exch { false charpath 5 index 5 index rmoveto 6 index eq { 7 index 7 index rmoveto } if } exch cshow2 6 {pop} repeat } def /Tj { fCol 1 index stringwidth pdfTextMat idtransform pop sub 1 index length dup 0 ne { div } { pop pop 0 } ifelse pdfWordSpacing pdfHorizScaling mul 0 pdfTextMat dtransform 32 4 3 roll pdfCharSpacing pdfHorizScaling mul add 0 pdfTextMat dtransform 6 5 roll Tj1 } def /Tj16 { fCol 2 index stringwidth pdfTextMat idtransform pop sub exch div pdfWordSpacing pdfHorizScaling mul 0 pdfTextMat dtransform 32 4 3 roll pdfCharSpacing pdfHorizScaling mul add 0 pdfTextMat dtransform 6 5 roll Tj1 } def /Tj16V { fCol 2 index stringwidth pdfTextMat idtransform exch pop sub exch div 0 pdfWordSpacing pdfTextMat dtransform 32 4 3 roll pdfCharSpacing add 0 exch pdfTextMat dtransform 6 5 roll Tj1 } def /Tj1 { 0 pdfTextRise pdfTextMat dtransform rmoveto currentpoint 8 2 roll pdfTextRender 1 and 0 eq { 6 copy awidthshow } if pdfTextRender 3 and dup 1 eq exch 2 eq or { 7 index 7 index moveto 6 copy currentfont /FontType get 3 eq { fCol } { sCol } ifelse false awcp currentpoint stroke moveto } if pdfTextRender 4 and 0 ne { 8 6 roll moveto false awcp /pdfTextClipPath [ pdfTextClipPath aload pop {/moveto cvx} {/lineto cvx} {/curveto cvx} {/closepath cvx} pathforall ] def currentpoint newpath moveto } { 8 {pop} repeat } ifelse 0 pdfTextRise neg pdfTextMat dtransform rmoveto } def /TJm { pdfFontSize 0.001 mul mul neg 0 pdfTextMat dtransform rmoveto } def /TJmV { pdfFontSize 0.001 mul mul neg 0 exch pdfTextMat dtransform rmoveto } def /Tclip { pdfTextClipPath cvx exec clip newpath /pdfTextClipPath [] def } def % Level 2 image operators /pdfImBuf 100 string def /pdfIm { image { currentfile pdfImBuf readline not { pop exit } if (%-EOD-) eq { exit } if } loop } def /pdfImM { fCol imagemask { currentfile pdfImBuf readline not { pop exit } if (%-EOD-) eq { exit } if } loop } def /pr { 2 index 2 index 3 2 roll putinterval 4 add } def /pdfImClip { gsave 0 2 4 index length 1 sub { dup 4 index exch 2 copy get 5 index div put 1 add 3 index exch 2 copy get 3 index div put } for pop pop rectclip } def /pdfImClipEnd { grestore } def % shading operators /colordelta { false 0 1 3 index length 1 sub { dup 4 index exch get 3 index 3 2 roll get sub abs 0.004 gt { pop true } if } for exch pop exch pop } def /funcCol { func n array astore } def /funcSH { dup 0 eq { true } { dup 6 eq { false } { 4 index 4 index funcCol dup 6 index 4 index funcCol dup 3 1 roll colordelta 3 1 roll 5 index 5 index funcCol dup 3 1 roll colordelta 3 1 roll 6 index 8 index funcCol dup 3 1 roll colordelta 3 1 roll colordelta or or or } ifelse } ifelse { 1 add 4 index 3 index add 0.5 mul exch 4 index 3 index add 0.5 mul exch 6 index 6 index 4 index 4 index 4 index funcSH 2 index 6 index 6 index 4 index 4 index funcSH 6 index 2 index 4 index 6 index 4 index funcSH 5 3 roll 3 2 roll funcSH pop pop } { pop 3 index 2 index add 0.5 mul 3 index 2 index add 0.5 mul funcCol sc dup 4 index exch mat transform m 3 index 3 index mat transform l 1 index 3 index mat transform l mat transform l pop pop h f* } ifelse } def /axialCol { dup 0 lt { pop t0 } { dup 1 gt { pop t1 } { dt mul t0 add } ifelse } ifelse func n array astore } def /axialSH { dup 0 eq { true } { dup 8 eq { false } { 2 index axialCol 2 index axialCol colordelta } ifelse } ifelse { 1 add 3 1 roll 2 copy add 0.5 mul dup 4 3 roll exch 4 index axialSH exch 3 2 roll axialSH } { pop 2 copy add 0.5 mul axialCol sc exch dup dx mul x0 add exch dy mul y0 add 3 2 roll dup dx mul x0 add exch dy mul y0 add dx abs dy abs ge { 2 copy yMin sub dy mul dx div add yMin m yMax sub dy mul dx div add yMax l 2 copy yMax sub dy mul dx div add yMax l yMin sub dy mul dx div add yMin l h f* } { exch 2 copy xMin sub dx mul dy div add xMin exch m xMax sub dx mul dy div add xMax exch l exch 2 copy xMax sub dx mul dy div add xMax exch l xMin sub dx mul dy div add xMin exch l h f* } ifelse } ifelse } def /radialCol { dup t0 lt { pop t0 } { dup t1 gt { pop t1 } if } ifelse func n array astore } def /radialSH { dup 0 eq { true } { dup 8 eq { false } { 2 index dt mul t0 add radialCol 2 index dt mul t0 add radialCol colordelta } ifelse } ifelse { 1 add 3 1 roll 2 copy add 0.5 mul dup 4 3 roll exch 4 index radialSH exch 3 2 roll radialSH } { pop 2 copy add 0.5 mul dt mul t0 add radialCol sc encl { exch dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add 0 360 arc h dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add 360 0 arcn h f } { 2 copy dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add a1 a2 arcn dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add a2 a1 arcn h dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add a1 a2 arc dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add a2 a1 arc h f } ifelse } ifelse } def end %%EndResource %%EndProlog %%BeginSetup xpdf begin /F5_0 /Helvetica 0.7203 1 [ /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle /parenleft/parenright/asterisk/plus/comma/hyphen/period/slash /zero/one/two/three/four/five/six/seven /eight/nine/colon/semicolon/less/equal/greater/question /at/A/B/C/D/E/F/G /H/I/J/K/L/M/N/O /P/Q/R/S/T/U/V/W /X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore /grave/a/b/c/d/e/f/g /h/i/j/k/l/m/n/o /p/q/r/s/t/u/v/w /x/y/z/braceleft/bar/braceright/asciitilde/bullet /Euro/bullet/quotesinglbase/florin/quotedblbase/ellipsis/dagger/daggerdbl /circumflex/perthousand/Scaron/guilsinglleft/OE/bullet/Zcaron/bullet /bullet/quoteleft/quoteright/quotedblleft/quotedblright/bullet/endash/emdash /tilde/trademark/scaron/guilsinglright/oe/bullet/zcaron/Ydieresis /space/exclamdown/cent/sterling/currency/yen/brokenbar/section /dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered/macron /degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered /cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown /Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla /Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis /Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply /Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls /agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla /egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis /eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide /oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis] pdfMakeFont /F7_0 /Helvetica 0.7203 1 [ /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle /parenleft/parenright/asterisk/plus/comma/hyphen/period/slash /zero/one/two/three/four/five/six/seven /eight/nine/colon/semicolon/less/equal/greater/question /at/A/B/C/D/E/F/G /H/I/J/K/L/M/N/O /P/Q/R/S/T/U/V/W /X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore /grave/a/b/c/d/e/f/g /h/i/j/k/l/m/n/o /p/q/r/s/t/u/v/w /x/y/z/braceleft/bar/braceright/asciitilde/bullet /Euro/bullet/quotesinglbase/florin/quotedblbase/ellipsis/dagger/daggerdbl /circumflex/perthousand/Scaron/guilsinglleft/OE/bullet/Zcaron/bullet /bullet/quoteleft/quoteright/quotedblleft/quotedblright/bullet/endash/emdash /tilde/trademark/scaron/guilsinglright/oe/bullet/zcaron/Ydieresis /space/exclamdown/cent/sterling/currency/yen/brokenbar/section /dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered/macron /degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered /cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown /Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla /Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis /Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply /Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls /agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla /egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis /eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide /oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis] pdfMakeFont 612 792 false pdfSetup %%EndSetup %%Page: 1 1 %%BeginPageSetup %%PageOrientation: Landscape pdfStartPage 90 rotate 36 -576 translate 0 0 720 540 re W %%EndPageSetup [] 0 d 1 i 0 j 0 J 10 M 1 w /DeviceGray {} cs [0] sc /DeviceGray {} CS [0] SC false op false OP {} settransfer 0 0 720 540 re W q q 0 0.0001 720 540 re W* /DeviceGray {} cs [1] sc 0 0 720 540 re f* Q 1 w /DeviceGray {} CS [0] SC 1 j 492 480 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 516.55 484.42] Tm 0 0 Td /DeviceGray {} cs [0] sc /DeviceGray {} CS [0] SC /F5_0 15.984 Tf (CallE) 47.952 Tj -2 TJm (xp) 19.1808 Tj -8 TJm (r) 9.5904 Tj /DeviceGray {} CS [0] SC 492 402 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 511.75 406.42] Tm 0 0 Td /DeviceGray {} CS [0] SC /F5_0 15.96 Tf (Na) 19.152 Tj -2 TJm (me) 19.152 Tj -2 TJm (dE) 19.152 Tj -2 TJm (x) 9.576 Tj -8 TJm (pr) 19.152 Tj /DeviceGray {} CS [0] SC 492 342 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 521.38 346.39] Tm 0 0 Td /DeviceGray {} CS [0] SC 0.024 Tc /F5_0 15.96 Tf (DefExpr) 67.032 Tj /DeviceGray {} CS [0] SC 492 246 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 511.75 250.37] Tm 0 0 Td /DeviceGray {} CS [0] SC 0 Tc /F5_0 15.96 Tf (Bl) 19.152 Tj -2 TJm (oc) 19.152 Tj -2 TJm (kS) 19.152 Tj -2 TJm (t) 9.576 Tj -8 TJm (mt) 19.152 Tj /DeviceGray {} CS [0] SC 492 150 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 516.55 154.34] Tm 0 0 Td /DeviceGray {} CS [0] SC /F5_0 15.96 Tf (Co) 19.152 Tj -2 TJm (nd) 19.152 Tj -2 TJm (St) 19.152 Tj -2 TJm (m) 9.576 Tj -8 TJm (t) 9.576 Tj /DeviceGray {} CS [0] SC 90 492 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 95.304 496.44] Tm 0 0 Td /DeviceGray {} CS [0] SC /F5_0 15.96 Tf (Mo) 19.152 Tj -2 TJm (du) 19.152 Tj -2 TJm (le) 19.152 Tj -2 TJm (S) 9.576 Tj -8 TJm (ym) 19.152 Tj -2 TJm (bo) 19.152 Tj -2 TJm (l) 9.576 Tj /DeviceGray {} CS [0] SC 90 432 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 109.7 436.42] Tm 0 0 Td /DeviceGray {} CS [0] SC /F5_0 15.96 Tf (Ar) 19.152 Tj -2 TJm (gS) 19.152 Tj -2 TJm (ym) 19.152 Tj -2 TJm (b) 9.576 Tj -8 TJm (ol) 19.152 Tj /DeviceGray {} CS [0] SC 90 336 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 104.9 340.39] Tm 0 0 Td /DeviceGray {} CS [0] SC /F5_0 15.96 Tf (Ty) 19.152 Tj -2 TJm (pe) 19.152 Tj -2 TJm (Sy) 19.152 Tj -2 TJm (m) 9.576 Tj -8 TJm (bo) 19.152 Tj -2 TJm (l) 9.576 Tj /DeviceGray {} CS [0] SC 90 276 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 114.5 280.37] Tm 0 0 Td /DeviceGray {} CS [0] SC /F5_0 15.96 Tf (Fn) 19.152 Tj -2 TJm (Sy) 19.152 Tj -2 TJm (mb) 19.152 Tj -2 TJm (o) 9.576 Tj -8 TJm (l) 9.576 Tj /DeviceGray {} CS [0] SC 90 114 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 114.5 118.34] Tm 0 0 Td /DeviceGray {} CS [0] SC /F5_0 15.96 Tf (En) 19.152 Tj -2 TJm (um) 19.152 Tj -2 TJm (Ty) 19.152 Tj -2 TJm (p) 9.576 Tj -8 TJm (e) 9.576 Tj /DeviceGray {} CS [0] SC 90 54 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 109.7 58.32] Tm 0 0 Td /DeviceGray {} CS [0] SC /F5_0 15.96 Tf (Cl) 19.152 Tj -2 TJm (as) 19.152 Tj -2 TJm (sT) 19.152 Tj -2 TJm (y) 9.576 Tj -8 TJm (pe) 19.152 Tj /DeviceGray {} CS [0] SC 492 462 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 516.55 466.42] Tm 0 0 Td /DeviceGray {} CS [0] SC /F7_0 15.96 Tf (ba) 19.152 Tj -2 TJm (se) 19.152 Tj -2 TJm (Ex) 19.152 Tj -2 TJm (p) 9.576 Tj -8 TJm (r) 9.576 Tj /DeviceGray {} CS [0] SC 492 444 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 521.38 448.42] Tm 0 0 Td /DeviceGray {} CS [0] SC 0.024 Tc /F7_0 15.96 Tf (argList) 67.032 Tj /DeviceGray {} CS [0] SC 492 384 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 526.15 388.39] Tm 0 0 Td /DeviceGray {} CS [0] SC 0.0096 Tc /F7_0 15.984 Tf (actual) 57.5424 Tj /DeviceGray {} CS [0] SC 492 324 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 535.78 328.39] Tm 0 0 Td /DeviceGray {} CS [0] SC 0.024 Tc /F7_0 15.96 Tf (init) 38.304 Tj /DeviceGray {} CS [0] SC 492 306 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 516.55 310.39] Tm 0 0 Td /DeviceGray {} CS [0] SC 0 Tc /F7_0 15.96 Tf (ex) 19.152 Tj -2 TJm (pr) 19.152 Tj -2 TJm (Ty) 19.152 Tj -2 TJm (p) 9.576 Tj -8 TJm (e) 9.576 Tj /DeviceGray {} CS [0] SC 492 288 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 540.58 292.37] Tm 0 0 Td /DeviceGray {} CS [0] SC 0.0096 Tc /F7_0 15.984 Tf (sym) 28.7712 Tj /DeviceGray {} CS [0] SC 492 228 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 535.78 232.37] Tm 0 0 Td /DeviceGray {} CS [0] SC 0.024 Tc /F7_0 15.96 Tf (body) 38.304 Tj /DeviceGray {} CS [0] SC 492 210 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 511.75 214.37] Tm 0 0 Td /DeviceGray {} CS [0] SC 0 Tc /F7_0 15.96 Tf (bl) 19.152 Tj -2 TJm (oc) 19.152 Tj -2 TJm (kI) 19.152 Tj -2 TJm (n) 9.576 Tj -8 TJm (fo) 19.152 Tj /DeviceGray {} CS [0] SC 492 192 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 521.38 196.34] Tm 0 0 Td /DeviceGray {} CS [0] SC 0.0096 Tc /F7_0 15.984 Tf (modUses) 67.1328 Tj /DeviceGray {} CS [0] SC 492 132 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 516.55 136.34] Tm 0 0 Td /DeviceGray {} CS [0] SC 0 Tc /F7_0 15.96 Tf (co) 19.152 Tj -2 TJm (nd) 19.152 Tj -2 TJm (Ex) 19.152 Tj -2 TJm (p) 9.576 Tj -8 TJm (r) 9.576 Tj /DeviceGray {} CS [0] SC 492 114 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 516.55 118.34] Tm 0 0 Td /DeviceGray {} CS [0] SC /F7_0 15.96 Tf (th) 19.152 Tj -2 TJm (en) 19.152 Tj -2 TJm (St) 19.152 Tj -2 TJm (m) 9.576 Tj -8 TJm (t) 9.576 Tj /DeviceGray {} CS [0] SC 492 96 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 516.55 100.32] Tm 0 0 Td /DeviceGray {} CS [0] SC /F7_0 15.984 Tf (elseS) 47.952 Tj -2 TJm (tm) 19.1808 Tj -8 TJm (t) 9.5904 Tj /DeviceGray {} CS [0] SC 90 474 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 128.9 478.42] Tm 0 0 Td /DeviceGray {} CS [0] SC 0.024 Tc /F7_0 15.96 Tf (block) 47.88 Tj /DeviceGray {} CS [0] SC 90 414 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 114.5 418.42] Tm 0 0 Td /DeviceGray {} CS [0] SC 0 Tc /F7_0 15.96 Tf (ty) 19.152 Tj -2 TJm (pe) 19.152 Tj -2 TJm (Ex) 19.152 Tj -2 TJm (p) 9.576 Tj -8 TJm (r) 9.576 Tj /DeviceGray {} CS [0] SC 90 396 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 100.1 400.42] Tm 0 0 Td /DeviceGray {} CS [0] SC /F7_0 15.96 Tf (de) 19.152 Tj -2 TJm (fa) 19.152 Tj -2 TJm (ul) 19.152 Tj -2 TJm (t) 9.576 Tj -8 TJm (Ex) 19.152 Tj -2 TJm (pr) 19.152 Tj /DeviceGray {} CS [0] SC 90 378 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 95.304 382.39] Tm 0 0 Td /DeviceGray {} CS [0] SC /F7_0 15.96 Tf (va) 19.152 Tj -2 TJm (ri) 19.152 Tj -2 TJm (ab) 19.152 Tj -2 TJm (l) 9.576 Tj -8 TJm (eE) 19.152 Tj -2 TJm (xp) 19.152 Tj -2 TJm (r) 9.576 Tj /DeviceGray {} CS [0] SC 90 318 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 133.7 322.39] Tm 0 0 Td /DeviceGray {} CS [0] SC 0.024 Tc /F7_0 15.96 Tf (type) 38.304 Tj /DeviceGray {} CS [0] SC 90 258 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 119.3 262.37] Tm 0 0 Td /DeviceGray {} CS [0] SC /F7_0 15.96 Tf (formals) 67.032 Tj /DeviceGray {} CS [0] SC 90 240 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 124.1 244.37] Tm 0 0 Td /DeviceGray {} CS [0] SC /F7_0 15.96 Tf (setter) 57.456 Tj /DeviceGray {} CS [0] SC 90 222 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 133.7 226.37] Tm 0 0 Td /DeviceGray {} CS [0] SC /F7_0 15.96 Tf (body) 38.304 Tj /DeviceGray {} CS [0] SC 90 204 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 128.9 208.37] Tm 0 0 Td /DeviceGray {} CS [0] SC /F7_0 15.96 Tf (where) 47.88 Tj /DeviceGray {} CS [0] SC 90 186 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 100.1 190.34] Tm 0 0 Td /DeviceGray {} CS [0] SC 0 Tc /F7_0 15.984 Tf (retEx) 47.952 Tj -2 TJm (pr) 19.1808 Tj -8 TJm (Type) 38.3616 Tj /DeviceGray {} CS [0] SC 90 96 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 109.7 100.32] Tm 0 0 Td /DeviceGray {} CS [0] SC /F7_0 15.984 Tf (const) 47.952 Tj -2 TJm (an) 19.1808 Tj -8 TJm (ts) 19.1808 Tj /DeviceGray {} CS [0] SC 90 36 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 124.1 40.32] Tm 0 0 Td /DeviceGray {} CS [0] SC 0.024 Tc /F7_0 15.96 Tf (fields) 57.456 Tj /DeviceGray {} CS [0] SC 90 18 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 114.5 22.32] Tm 0 0 Td /DeviceGray {} CS [0] SC 0 Tc /F7_0 15.96 Tf (in) 19.152 Tj -2 TJm (he) 19.152 Tj -2 TJm (ri) 19.152 Tj -2 TJm (t) 9.576 Tj -8 TJm (s) 9.576 Tj /DeviceGray {} cs [0] sc 90.064 326.5 m 88.661 326.32 l 88.772 326.35 l 87.362 325.83 l 87.45 325.87 l 86.055 325.01 l 86.118 325.05 l 84.731 323.86 l 83.394 322.39 l 82.06 320.62 l 80.731 318.55 l 79.419 316.19 l 78.126 313.56 l 76.853 310.66 l 75.607 307.51 l 74.383 304.13 l 73.203 300.52 l 72.044 296.69 l 70.929 292.66 l 69.86 288.44 l 68.827 284.04 l 67.846 279.47 l 66.91 274.73 l 66.027 269.86 l 65.203 264.84 l 64.432 259.7 l 63.076 249.1 l 61.983 238.14 l 61.174 226.91 l 60.672 215.49 l 60.5 203.99 l 60.605 192.49 l 60.905 181.07 l 61.392 169.84 l 62.044 158.86 l 62.861 148.26 l 63.325 143.12 l 63.82 138.1 l 64.352 133.22 l 64.914 128.49 l 65.498 123.91 l 66.12 119.51 l 66.764 115.28 l 67.431 111.25 l 68.127 107.41 l 68.838 103.8 l 69.571 100.41 l 70.326 97.257 l 71.089 94.349 l 71.872 91.71 l 72.662 89.341 l 73.464 87.263 l 73.426 87.34 l 74.933 84.832 l 74.076 84.317 l 72.569 86.825 l 72.554 86.85 72.541 86.876 72.531 86.903 c 71.713 89.025 l 70.913 91.425 l 70.121 94.096 l 69.354 97.024 l 68.594 100.2 l 67.857 103.61 l 67.143 107.24 l 66.444 111.08 l 65.776 115.13 l 65.13 119.37 l 64.507 123.78 l 63.921 128.37 l 63.358 133.12 l 62.825 138 l 62.33 143.03 l 61.864 148.18 l 61.046 158.81 l 60.393 169.79 l 59.905 181.04 l 59.605 192.48 l 59.5 204.01 l 59.673 215.53 l 60.176 226.98 l 60.987 238.23 l 62.084 249.23 l 63.443 259.85 l 64.217 265 l 65.043 270.04 l 65.929 274.93 l 66.869 279.67 l 67.853 284.27 l 68.89 288.69 l 69.966 292.93 l 71.086 296.98 l 72.252 300.83 l 73.442 304.47 l 74.678 307.88 l 75.937 311.06 l 77.229 314 l 78.546 316.68 l 79.889 319.09 l 81.26 321.22 l 82.656 323.07 l 84.079 324.62 l 85.467 325.81 l 85.486 325.83 85.507 325.84 85.53 325.86 c 86.925 326.72 l 86.953 326.74 86.982 326.75 87.013 326.76 c 88.423 327.29 l 88.459 327.3 88.496 327.31 88.534 327.32 c 89.936 327.5 l 90.064 326.5 l h 75.95 87.387 m 78 81 l 71.66 83.192 l 75.95 87.387 l h f 215.25 105.84 m 220.29 110.33 l 221.79 108.65 l 216.75 104.16 l 215.25 105.84 l h 221.97 111.83 m 227.01 116.32 l 228.51 114.64 l 223.47 110.15 l 221.97 111.83 l h 228.69 117.82 m 233.73 122.31 l 235.22 120.63 l 230.19 116.14 l 228.69 117.82 l h 235.41 123.81 m 240.45 128.3 l 241.94 126.62 l 236.9 122.13 l 235.41 123.81 l h 242.13 129.79 m 247.16 134.28 l 248.66 132.61 l 243.62 128.11 l 242.13 129.79 l h 248.84 135.78 m 253.88 140.27 l 255.38 138.59 l 250.34 134.1 l 248.84 135.78 l h 255.56 141.77 m 260.6 146.26 l 262.1 144.58 l 257.06 140.09 l 255.56 141.77 l h 262.28 147.76 m 267.32 152.25 l 268.82 150.57 l 263.78 146.08 l 262.28 147.76 l h 269 153.75 m 274.04 158.24 l 275.54 156.56 l 270.5 152.07 l 269 153.75 l h 275.72 159.74 m 280.76 164.23 l 282.25 162.55 l 277.22 158.06 l 275.72 159.74 l h 282.44 165.72 m 287.48 170.21 l 288.97 168.54 l 283.93 164.04 l 282.44 165.72 l h 289.16 171.71 m 294.19 176.2 l 295.69 174.52 l 290.65 170.03 l 289.16 171.71 l h 295.87 177.7 m 300.91 182.19 l 302.41 180.51 l 297.37 176.02 l 295.87 177.7 l h 302.59 183.69 m 307.63 188.18 l 309.13 186.5 l 304.09 182.01 l 302.59 183.69 l h 309.31 189.68 m 314.35 194.17 l 315.85 192.49 l 310.81 188 l 309.31 189.68 l h 316.03 195.67 m 321.07 200.16 l 322.57 198.48 l 317.53 193.99 l 316.03 195.67 l h 322.75 201.65 m 327.79 206.14 l 329.29 204.47 l 324.25 199.97 l 322.75 201.65 l h 329.47 207.64 m 334.51 212.13 l 336 210.45 l 330.96 205.96 l 329.47 207.64 l h 336.19 213.63 m 341.23 218.12 l 342.72 216.44 l 337.68 211.95 l 336.19 213.63 l h 342.9 219.62 m 347.94 224.11 l 349.44 222.43 l 344.4 217.94 l 342.9 219.62 l h 349.62 225.61 m 354.66 230.1 l 356.16 228.42 l 351.12 223.93 l 349.62 225.61 l h 356.34 231.6 m 361.38 236.09 l 362.88 234.41 l 357.84 229.92 l 356.34 231.6 l h 363.06 237.58 m 368.1 242.07 l 369.6 240.4 l 364.56 235.9 l 363.06 237.58 l h 369.78 243.57 m 374.82 248.06 l 376.32 246.38 l 371.28 241.89 l 369.78 243.57 l h 376.5 249.56 m 381.54 254.05 l 383.03 252.37 l 377.99 247.88 l 376.5 249.56 l h 383.22 255.55 m 388.26 260.04 l 389.75 258.36 l 384.71 253.87 l 383.22 255.55 l h 389.94 261.54 m 394.97 266.03 l 396.47 264.35 l 391.43 259.86 l 389.94 261.54 l h 396.65 267.53 m 401.69 272.02 l 403.19 270.34 l 398.15 265.85 l 396.65 267.53 l h 403.37 273.51 m 408.41 278 l 409.91 276.33 l 404.87 271.83 l 403.37 273.51 l h 410.09 279.5 m 415.13 283.99 l 416.63 282.31 l 411.59 277.82 l 410.09 279.5 l h 416.81 285.49 m 421.85 289.98 l 423.35 288.3 l 418.31 283.81 l 416.81 285.49 l h 423.53 291.48 m 428.57 295.97 l 430.06 294.29 l 425.03 289.8 l 423.53 291.48 l h 430.25 297.47 m 435.29 301.96 l 436.78 300.28 l 431.74 295.79 l 430.25 297.47 l h 436.97 303.46 m 442 307.95 l 443.5 306.27 l 438.46 301.78 l 436.97 303.46 l h 443.68 309.44 m 448.72 313.93 l 450.22 312.26 l 445.18 307.76 l 443.68 309.44 l h 450.4 315.43 m 455.44 319.92 l 456.94 318.24 l 451.9 313.75 l 450.4 315.43 l h 457.12 321.42 m 462.16 325.91 l 463.66 324.23 l 458.62 319.74 l 457.12 321.42 l h 463.84 327.41 m 468.88 331.9 l 470.38 330.22 l 465.34 325.73 l 463.84 327.41 l h 470.56 333.4 m 475.6 337.89 l 477.09 336.21 l 472.06 331.72 l 470.56 333.4 l h 477.28 339.39 m 482.32 343.88 l 483.81 342.2 l 478.77 337.71 l 477.28 339.39 l h 484 345.37 m 487.05 348.1 l 488.55 346.42 l 485.49 343.69 l 484 345.37 l h 484.72 349.03 m 492 351 l 489.21 343.99 l 484.72 349.03 l h f 215.16 45.754 m 219.69 50.766 l 221.36 49.259 l 216.84 44.247 l 215.16 45.754 l h 221.19 52.437 m 225.71 57.449 l 227.38 55.942 l 222.86 50.93 l 221.19 52.437 l h 227.22 59.12 m 231.74 64.132 l 233.41 62.625 l 228.89 57.613 l 227.22 59.12 l h 233.25 65.803 m 237.77 70.816 l 239.44 69.309 l 234.92 64.296 l 233.25 65.803 l h 239.28 72.486 m 243.8 77.499 l 245.47 75.992 l 240.95 70.979 l 239.28 72.486 l h 245.3 79.17 m 249.82 84.182 l 251.5 82.675 l 246.97 77.663 l 245.3 79.17 l h 251.33 85.853 m 255.85 90.865 l 257.52 89.358 l 253 84.346 l 251.33 85.853 l h 257.36 92.536 m 261.88 97.548 l 263.55 96.041 l 259.03 91.029 l 257.36 92.536 l h 263.39 99.219 m 267.91 104.23 l 269.58 102.72 l 265.06 97.712 l 263.39 99.219 l h 269.42 105.9 m 273.94 110.91 l 275.61 109.41 l 271.09 104.4 l 269.42 105.9 l h 275.44 112.59 m 279.96 117.6 l 281.64 116.09 l 277.11 111.08 l 275.44 112.59 l h 281.47 119.27 m 285.99 124.28 l 287.66 122.77 l 283.14 117.76 l 281.47 119.27 l h 287.5 125.95 m 292.02 130.96 l 293.69 129.46 l 289.17 124.44 l 287.5 125.95 l h 293.53 132.63 m 298.05 137.65 l 299.72 136.14 l 295.2 131.13 l 293.53 132.63 l h 299.56 139.32 m 304.08 144.33 l 305.75 142.82 l 301.23 137.81 l 299.56 139.32 l h 305.58 146 m 310.1 151.01 l 311.77 149.51 l 307.25 144.49 l 305.58 146 l h 311.61 152.68 m 316.13 157.7 l 317.8 156.19 l 313.28 151.18 l 311.61 152.68 l h 317.64 159.37 m 322.16 164.38 l 323.83 162.87 l 319.31 157.86 l 317.64 159.37 l h 323.67 166.05 m 328.19 171.06 l 329.86 169.56 l 325.34 164.54 l 323.67 166.05 l h 329.69 172.73 m 334.22 177.75 l 335.89 176.24 l 331.37 171.23 l 329.69 172.73 l h 335.72 179.42 m 340.24 184.43 l 341.91 182.92 l 337.39 177.91 l 335.72 179.42 l h 341.75 186.1 m 346.27 191.11 l 347.94 189.61 l 343.42 184.59 l 341.75 186.1 l h 347.78 192.78 m 352.3 197.8 l 353.97 196.29 l 349.45 191.28 l 347.78 192.78 l h 353.81 199.47 m 358.33 204.48 l 360 202.97 l 355.48 197.96 l 353.81 199.47 l h 359.83 206.15 m 364.36 211.16 l 366.03 209.65 l 361.5 204.64 l 359.83 206.15 l h 365.86 212.83 m 370.38 217.84 l 372.05 216.34 l 367.53 211.33 l 365.86 212.83 l h 371.89 219.52 m 376.41 224.53 l 378.08 223.02 l 373.56 218.01 l 371.89 219.52 l h 377.92 226.2 m 382.44 231.21 l 384.11 229.7 l 379.59 224.69 l 377.92 226.2 l h 383.95 232.88 m 388.47 237.89 l 390.14 236.39 l 385.62 231.37 l 383.95 232.88 l h 389.97 239.57 m 394.49 244.58 l 396.17 243.07 l 391.64 238.06 l 389.97 239.57 l h 396 246.25 m 400.52 251.26 l 402.19 249.75 l 397.67 244.74 l 396 246.25 l h 402.03 252.93 m 406.55 257.94 l 408.22 256.44 l 403.7 251.42 l 402.03 252.93 l h 408.06 259.61 m 412.58 264.63 l 414.25 263.12 l 409.73 258.11 l 408.06 259.61 l h 414.09 266.3 m 418.61 271.31 l 420.28 269.8 l 415.76 264.79 l 414.09 266.3 l h 420.11 272.98 m 424.63 277.99 l 426.3 276.49 l 421.78 271.47 l 420.11 272.98 l h 426.14 279.66 m 430.66 284.68 l 432.33 283.17 l 427.81 278.16 l 426.14 279.66 l h 432.17 286.35 m 436.69 291.36 l 438.36 289.85 l 433.84 284.84 l 432.17 286.35 l h 438.2 293.03 m 442.72 298.04 l 444.39 296.54 l 439.87 291.52 l 438.2 293.03 l h 444.22 299.71 m 448.75 304.73 l 450.42 303.22 l 445.9 298.21 l 444.22 299.71 l h 450.25 306.4 m 454.77 311.41 l 456.44 309.9 l 451.92 304.89 l 450.25 306.4 l h 456.28 313.08 m 460.8 318.09 l 462.47 316.58 l 457.95 311.57 l 456.28 313.08 l h 462.31 319.76 m 466.83 324.77 l 468.5 323.27 l 463.98 318.26 l 462.31 319.76 l h 468.34 326.45 m 472.86 331.46 l 474.53 329.95 l 470.01 324.94 l 468.34 326.45 l h 474.36 333.13 m 478.89 338.14 l 480.56 336.63 l 476.04 331.62 l 474.36 333.13 l h 480.39 339.81 m 484.91 344.82 l 486.58 343.32 l 482.06 338.3 l 480.39 339.81 l h 486.42 346.49 m 487.4 347.58 l 489.07 346.07 l 488.09 344.99 l 486.42 346.49 l h 484.97 348.25 m 492 351 l 489.99 343.73 l 484.97 348.25 l h f 215.22 27.815 m 220.11 32.473 l 221.66 30.844 l 216.78 26.186 l 215.22 27.815 l h 221.74 34.025 m 226.62 38.683 l 228.18 37.055 l 223.29 32.397 l 221.74 34.025 l h 228.25 40.236 m 233.14 44.894 l 234.69 43.266 l 229.8 38.608 l 228.25 40.236 l h 234.76 46.447 m 239.65 51.105 l 241.2 49.476 l 236.32 44.818 l 234.76 46.447 l h 241.28 52.657 m 246.16 57.315 l 247.72 55.687 l 242.83 51.029 l 241.28 52.657 l h 247.79 58.868 m 252.68 63.526 l 254.23 61.898 l 249.34 57.24 l 247.79 58.868 l h 254.31 65.079 m 259.19 69.737 l 260.74 68.108 l 255.86 63.45 l 254.31 65.079 l h 260.82 71.289 m 265.7 75.948 l 267.26 74.319 l 262.37 69.661 l 260.82 71.289 l h 267.33 77.5 m 272.22 82.158 l 273.77 80.53 l 268.89 75.872 l 267.33 77.5 l h 273.85 83.711 m 278.73 88.369 l 280.28 86.741 l 275.4 82.082 l 273.85 83.711 l h 280.36 89.922 m 285.25 94.58 l 286.8 92.951 l 281.91 88.293 l 280.36 89.922 l h 286.87 96.132 m 291.76 100.79 l 293.31 99.162 l 288.43 94.504 l 286.87 96.132 l h 293.39 102.34 m 298.27 107 l 299.82 105.37 l 294.94 100.71 l 293.39 102.34 l h 299.9 108.55 m 304.79 113.21 l 306.34 111.58 l 301.45 106.93 l 299.9 108.55 l h 306.41 114.76 m 311.3 119.42 l 312.85 117.79 l 307.97 113.14 l 306.41 114.76 l h 312.93 120.98 m 317.81 125.63 l 319.37 124 l 314.48 119.35 l 312.93 120.98 l h 319.44 127.19 m 324.33 131.84 l 325.88 130.22 l 320.99 125.56 l 319.44 127.19 l h 325.96 133.4 m 330.84 138.05 l 332.39 136.43 l 327.51 131.77 l 325.96 133.4 l h 332.47 139.61 m 337.35 144.27 l 338.91 142.64 l 334.02 137.98 l 332.47 139.61 l h 338.98 145.82 m 343.87 150.48 l 345.42 148.85 l 340.53 144.19 l 338.98 145.82 l h 345.5 152.03 m 350.38 156.69 l 351.93 155.06 l 347.05 150.4 l 345.5 152.03 l h 352.01 158.24 m 356.89 162.9 l 358.45 161.27 l 353.56 156.61 l 352.01 158.24 l h 358.52 164.45 m 363.41 169.11 l 364.96 167.48 l 360.08 162.82 l 358.52 164.45 l h 365.04 170.66 m 369.92 175.32 l 371.47 173.69 l 366.59 169.03 l 365.04 170.66 l h 371.55 176.87 m 376.44 181.53 l 377.99 179.9 l 373.1 175.24 l 371.55 176.87 l h 378.06 183.08 m 382.95 187.74 l 384.5 186.11 l 379.62 181.45 l 378.06 183.08 l h 384.58 189.29 m 389.46 193.95 l 391.02 192.32 l 386.13 187.66 l 384.58 189.29 l h 391.09 195.5 m 395.98 200.16 l 397.53 198.53 l 392.64 193.87 l 391.09 195.5 l h 397.6 201.71 m 402.49 206.37 l 404.04 204.74 l 399.16 200.09 l 397.6 201.71 l h 404.12 207.92 m 409 212.58 l 410.56 210.95 l 405.67 206.3 l 404.12 207.92 l h 410.63 214.14 m 415.52 218.79 l 417.07 217.16 l 412.18 212.51 l 410.63 214.14 l h 417.15 220.35 m 422.03 225 l 423.58 223.38 l 418.7 218.72 l 417.15 220.35 l h 423.66 226.56 m 428.54 231.21 l 430.1 229.59 l 425.21 224.93 l 423.66 226.56 l h 430.17 232.77 m 435.06 237.43 l 436.61 235.8 l 431.73 231.14 l 430.17 232.77 l h 436.69 238.98 m 441.57 243.64 l 443.12 242.01 l 438.24 237.35 l 436.69 238.98 l h 443.2 245.19 m 448.09 249.85 l 449.64 248.22 l 444.75 243.56 l 443.2 245.19 l h 449.71 251.4 m 454.6 256.06 l 456.15 254.43 l 451.27 249.77 l 449.71 251.4 l h 456.23 257.61 m 461.11 262.27 l 462.67 260.64 l 457.78 255.98 l 456.23 257.61 l h 462.74 263.82 m 467.63 268.48 l 469.18 266.85 l 464.29 262.19 l 462.74 263.82 l h 466.79 270.78 m 474 273 l 471.44 265.9 l 466.79 270.78 l h f /DeviceGray {} CS [0] SC 474 24 156 498 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 532.78 507.84] Tm 0 0 Td /DeviceGray {} cs [0] sc /DeviceGray {} CS [0] SC 0.024 Tc /F5_0 15.96 Tf (Expr) 38.304 Tj /DeviceGray {} cs [0] sc 215.67 268.08 m 222.13 270.04 l 222.78 267.89 l 216.33 265.92 l 215.67 268.08 l h 224.28 270.7 m 230.74 272.66 l 231.4 270.51 l 224.94 268.54 l 224.28 270.7 l h 232.89 273.32 m 239.35 275.28 l 240.01 273.13 l 233.55 271.16 l 232.89 273.32 l h 241.5 275.94 m 247.96 277.9 l 248.62 275.75 l 242.16 273.79 l 241.5 275.94 l h 250.11 278.56 m 256.57 280.52 l 257.23 278.37 l 250.77 276.41 l 250.11 278.56 l h 258.72 281.18 m 265.18 283.14 l 265.84 280.99 l 259.38 279.03 l 258.72 281.18 l h 267.33 283.8 m 273.79 285.76 l 274.45 283.61 l 267.99 281.65 l 267.33 283.8 l h 275.94 286.42 m 282.4 288.39 l 283.06 286.23 l 276.6 284.27 l 275.94 286.42 l h 284.55 289.04 m 291.01 291.01 l 291.67 288.85 l 285.21 286.89 l 284.55 289.04 l h 293.16 291.66 m 299.62 293.63 l 300.28 291.47 l 293.82 289.51 l 293.16 291.66 l h 301.77 294.28 m 308.23 296.25 l 308.89 294.09 l 302.43 292.13 l 301.77 294.28 l h 310.38 296.9 m 316.84 298.87 l 317.5 296.71 l 311.04 294.75 l 310.38 296.9 l h 318.99 299.52 m 325.45 301.49 l 326.11 299.33 l 319.65 297.37 l 318.99 299.52 l h 327.6 302.14 m 334.06 304.11 l 334.72 301.96 l 328.26 299.99 l 327.6 302.14 l h 336.21 304.76 m 342.67 306.73 l 343.33 304.58 l 336.87 302.61 l 336.21 304.76 l h 344.82 307.38 m 351.28 309.35 l 351.94 307.2 l 345.48 305.23 l 344.82 307.38 l h 353.43 310 m 359.89 311.97 l 360.55 309.82 l 354.09 307.85 l 353.43 310 l h 362.04 312.62 m 368.5 314.59 l 369.16 312.44 l 362.7 310.47 l 362.04 312.62 l h 370.65 315.24 m 377.11 317.21 l 377.77 315.06 l 371.31 313.09 l 370.65 315.24 l h 379.26 317.87 m 385.72 319.83 l 386.38 317.68 l 379.92 315.71 l 379.26 317.87 l h 387.87 320.49 m 394.33 322.45 l 394.99 320.3 l 388.53 318.33 l 387.87 320.49 l h 396.48 323.11 m 402.94 325.07 l 403.6 322.92 l 397.14 320.95 l 396.48 323.11 l h 405.09 325.73 m 411.55 327.69 l 412.21 325.54 l 405.75 323.57 l 405.09 325.73 l h 413.7 328.35 m 420.16 330.31 l 420.82 328.16 l 414.36 326.19 l 413.7 328.35 l h 422.31 330.97 m 428.77 332.93 l 429.43 330.78 l 422.97 328.82 l 422.31 330.97 l h 430.92 333.59 m 437.38 335.55 l 438.04 333.4 l 431.58 331.44 l 430.92 333.59 l h 439.53 336.21 m 445.99 338.17 l 446.65 336.02 l 440.19 334.06 l 439.53 336.21 l h 448.14 338.83 m 454.6 340.79 l 455.26 338.64 l 448.8 336.68 l 448.14 338.83 l h 456.75 341.45 m 463.21 343.41 l 463.87 341.26 l 457.41 339.3 l 456.75 341.45 l h 465.36 344.07 m 471.82 346.04 l 472.48 343.88 l 466.02 341.92 l 465.36 344.07 l h 473.97 346.69 m 480.43 348.66 l 481.09 346.5 l 474.63 344.54 l 473.97 346.69 l h 482.58 349.31 m 486.29 350.44 l 486.95 348.29 l 483.24 347.16 l 482.58 349.31 l h 484.56 352.26 m 492 351 l 486.52 345.81 l 484.56 352.26 l h f 215.83 249.47 m 487.14 349.74 l 487.48 348.8 l 216.17 248.53 l 215.83 249.47 l h 485.33 351.73 m 492 351 l 487.41 346.11 l 485.33 351.73 l h f 215.96 231.5 m 486.98 255.07 l 487.06 254.07 l 216.04 230.5 l 215.96 231.5 l h 485.76 257.47 m 492 255 l 486.28 251.49 l 485.76 257.47 l h f 215.92 213.49 m 486.98 254.74 l 487.13 253.75 l 216.08 212.51 l 215.92 213.49 l h 485.62 257.06 m 492 255 l 486.52 251.13 l 485.62 257.06 l h f 215.89 195.49 m 487.01 254.43 l 487.22 253.45 l 216.11 194.51 l 215.89 195.49 l h 485.5 256.66 m 492 255 l 486.77 250.79 l 485.5 256.66 l h f /DeviceGray {} CS [0] SC 78 6.0001 150 150 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 133.7 141.74] Tm 0 0 Td /DeviceGray {} cs [0] sc /DeviceGray {} CS [0] SC /F5_0 15.96 Tf (Type) 38.304 Tj /DeviceGray {} cs [0] sc 300 19.125 m 306.75 19.102 l 306.75 16.852 l 300 16.875 l 300 19.125 l h 309 19.094 m 315.75 19.071 l 315.75 16.821 l 309 16.844 l 309 19.094 l h 318 19.063 m 324.75 19.039 l 324.75 16.789 l 318 16.813 l 318 19.063 l h 327 19.032 m 330.38 19.02 l 330.37 16.77 l 327 16.782 l 327 19.032 l h 329.26 21.274 m 336 17.875 l 329.24 14.524 l 329.26 21.274 l h f [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 342.05 13.32] Tm 0 0 Td /DeviceGray {} cs [0] sc /F7_0 15.96 Tf (via ) 38.304 Tj [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 380.47 13.32] Tm 0 0 Td 0 Tc /F7_0 15.96 Tf (AL) 19.152 Tj -2 TJm (i) 9.576 Tj -8 TJm (st) 19.152 Tj /DeviceGray {} cs [0] sc 300 36.5 m 331 36.393 l 331 35.393 l 300 35.5 l 300 36.5 l h 330.01 38.896 m 336 35.875 l 329.99 32.896 l 330.01 38.896 l h f [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 342.05 31.32] Tm 0 0 Td /DeviceGray {} cs [0] sc /F7_0 15.96 Tf (vi) 19.152 Tj -2 TJm (a ) 19.152 Tj -2 TJm (po) 19.152 Tj -2 TJm (i) 9.576 Tj -8 TJm (nt) 19.152 Tj -2 TJm (er) 19.152 Tj /DeviceGray {} CS [0] SC 78 174 150 360 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 124.1 519.84] Tm 0 0 Td /DeviceGray {} CS [0] SC 0.024 Tc /F5_0 15.96 Tf (Symbol) 57.456 Tj /DeviceGray {} cs [0] sc 491.89 296.51 m 232.78 352.46 l 232.99 353.43 l 492.11 297.49 l 491.89 296.51 l h 233.23 349.8 m 228 354 l 234.5 355.67 l 233.23 349.8 l h f 618.02 315.5 m 618.86 315.47 l 619.73 315.38 l 620.59 315.22 l 621.45 315.01 l 622.3 314.75 l 623.14 314.43 l 623.97 314.06 l 624.79 313.64 l 625.58 313.18 l 626.37 312.67 l 627.87 311.52 l 629.3 310.22 l 630.64 308.78 l 631.86 307.21 l 632.97 305.53 l 633.95 303.77 l 634.77 301.91 l 635.44 300 l 635.71 299.02 l 635.94 298.03 l 636.12 297.04 l 636.24 296.03 l 636.33 295.02 l 636.35 294.01 l 636.32 292.03 l 636.21 290.06 l 636.06 288.12 l 635.84 286.23 l 635.58 284.4 l 635.26 282.65 l 634.91 281 l 634.5 279.44 l 634.07 278.01 l 634.06 277.97 634.04 277.92 634.02 277.89 c 633.34 276.8 l 632.49 277.33 l 633.17 278.42 l 633.11 278.3 l 633.54 279.69 l 633.93 281.2 l 634.28 282.83 l 634.59 284.55 l 634.85 286.35 l 635.06 288.21 l 635.22 290.11 l 635.32 292.04 l 635.35 293.99 l 635.33 294.94 l 635.25 295.9 l 635.13 296.86 l 634.97 297.8 l 634.75 298.75 l 634.49 299.67 l 633.85 301.51 l 633.07 303.28 l 632.14 304.98 l 631.08 306.59 l 629.9 308.1 l 628.63 309.48 l 627.27 310.72 l 625.82 311.83 l 625.08 312.31 l 624.32 312.75 l 623.55 313.15 l 622.79 313.5 l 622 313.8 l 621.21 314.04 l 620.42 314.24 l 619.62 314.38 l 618.82 314.47 l 617.98 314.5 l 618.02 315.5 l h 635.93 276.13 m 630 273 l 631.05 279.62 l 635.93 276.13 l h f 618.02 333.5 m 618.99 333.45 l 620 333.32 l 621 333.11 l 622 332.8 l 622.98 332.42 l 623.95 331.97 l 624.91 331.44 l 625.85 330.84 l 626.77 330.18 l 627.68 329.45 l 628.56 328.66 l 629.42 327.82 l 630.26 326.92 l 631.07 325.97 l 631.86 324.97 l 632.6 323.91 l 634.01 321.7 l 635.29 319.32 l 636.4 316.81 l 636.9 315.5 l 637.35 314.18 l 637.76 312.84 l 638.12 311.47 l 638.42 310.08 l 638.68 308.69 l 638.89 307.28 l 639.03 305.86 l 639.12 304.43 l 639.15 303.01 l 639.1 300.18 l 638.96 297.38 l 638.73 294.62 l 638.41 291.92 l 638.02 289.32 l 637.55 286.82 l 637.02 284.46 l 636.43 282.25 l 636.12 281.2 l 635.79 280.2 l 635.46 279.25 l 635.11 278.35 l 634.75 277.51 l 634.73 277.47 634.71 277.43 634.68 277.4 c 633.83 276.32 l 633.04 276.94 l 633.9 278.02 l 633.83 277.91 l 634.18 278.72 l 634.52 279.59 l 634.84 280.51 l 635.16 281.48 l 635.46 282.5 l 636.04 284.67 l 636.57 287 l 637.03 289.47 l 637.42 292.04 l 637.73 294.7 l 637.96 297.43 l 638.1 300.2 l 638.15 302.99 l 638.13 304.37 l 638.04 305.76 l 637.9 307.14 l 637.7 308.5 l 637.45 309.87 l 637.15 311.21 l 636.8 312.54 l 636.4 313.86 l 635.97 315.14 l 635.48 316.4 l 634.4 318.85 l 633.17 321.17 l 631.79 323.34 l 631.07 324.35 l 630.31 325.32 l 629.53 326.24 l 628.72 327.11 l 627.9 327.92 l 627.05 328.67 l 626.19 329.37 l 625.31 330 l 624.43 330.57 l 623.52 331.06 l 622.62 331.49 l 621.71 331.85 l 620.79 332.13 l 619.87 332.33 l 618.94 332.46 l 617.98 332.5 l 618.02 333.5 l h 636.3 275.3 m 630 273 l 631.94 279.42 l 636.3 275.3 l h f 618.03 393.5 m 619.43 393.41 l 620.9 393.15 l 622.35 392.71 l 623.79 392.11 l 625.21 391.36 l 626.61 390.45 l 627.99 389.41 l 629.35 388.22 l 630.67 386.91 l 631.98 385.46 l 633.25 383.9 l 634.49 382.22 l 635.69 380.44 l 636.86 378.55 l 637.98 376.56 l 639.07 374.48 l 640.11 372.31 l 641.1 370.06 l 642.04 367.74 l 642.93 365.34 l 643.76 362.88 l 644.54 360.36 l 645.26 357.78 l 645.91 355.15 l 646.49 352.48 l 647.01 349.77 l 647.45 347.03 l 647.82 344.26 l 648.11 341.47 l 648.33 338.65 l 648.45 335.84 l 648.5 333.01 l 648.48 330.18 l 648.39 327.37 l 648.27 324.56 l 648.09 321.78 l 647.88 319.01 l 647.6 316.27 l 646.95 310.9 l 646.56 308.28 l 646.13 305.71 l 645.66 303.19 l 645.17 300.73 l 644.63 298.34 l 644.07 296.02 l 643.48 293.78 l 642.86 291.61 l 642.21 289.54 l 641.54 287.55 l 640.83 285.67 l 640.12 283.89 l 639.37 282.21 l 638.61 280.65 l 637.84 279.21 l 637.03 277.89 l 636.23 276.71 l 636.2 276.68 636.18 276.64 636.15 276.62 c 634.6 275.23 l 633.94 275.97 l 635.48 277.36 l 635.4 277.27 l 636.18 278.41 l 636.95 279.69 l 637.71 281.1 l 638.46 282.61 l 639.19 284.27 l 639.9 286.01 l 640.59 287.88 l 641.25 289.84 l 641.89 291.89 l 642.51 294.03 l 643.1 296.26 l 643.66 298.56 l 644.19 300.93 l 644.68 303.37 l 645.14 305.87 l 645.57 308.43 l 645.96 311.03 l 646.61 316.37 l 646.88 319.09 l 647.1 321.84 l 647.27 324.61 l 647.4 327.4 l 647.48 330.19 l 647.5 332.99 l 647.46 335.79 l 647.33 338.58 l 647.12 341.36 l 646.83 344.12 l 646.46 346.87 l 646.02 349.59 l 645.52 352.26 l 644.93 354.91 l 644.29 357.51 l 643.58 360.06 l 642.82 362.56 l 642 364.99 l 641.12 367.36 l 640.18 369.66 l 639.21 371.88 l 638.18 374.02 l 637.11 376.07 l 636.01 378.02 l 634.86 379.88 l 633.69 381.63 l 632.47 383.27 l 631.23 384.79 l 629.97 386.19 l 628.69 387.46 l 627.39 388.61 l 626.07 389.61 l 624.74 390.47 l 623.4 391.19 l 622.06 391.76 l 620.72 392.16 l 619.37 392.41 l 617.97 392.5 l 618.03 393.5 l h 636.68 273.56 m 630 273 l 633.56 278.68 l 636.68 273.56 l h f 618.02 471.5 m 619.09 471.46 l 620.2 471.36 l 621.31 471.17 l 622.41 470.92 l 623.51 470.59 l 624.6 470.2 l 625.69 469.75 l 626.78 469.23 l 627.86 468.64 l 628.93 467.99 l 629.99 467.28 l 631.05 466.51 l 632.1 465.68 l 633.14 464.8 l 634.18 463.85 l 635.2 462.85 l 636.22 461.8 l 637.22 460.69 l 638.22 459.54 l 639.2 458.33 l 640.18 457.06 l 641.13 455.76 l 642.09 454.4 l 643.02 453.01 l 643.94 451.56 l 644.86 450.07 l 646.63 446.97 l 648.35 443.7 l 650 440.28 l 651.59 436.72 l 653.11 433.01 l 654.54 429.19 l 655.9 425.25 l 657.17 421.19 l 658.35 417.04 l 659.44 412.8 l 660.43 408.47 l 661.33 404.07 l 662.12 399.61 l 662.8 395.1 l 663.36 390.54 l 663.8 385.95 l 664.13 381.32 l 664.32 376.68 l 664.39 372.03 l 664.35 367.35 l 664.2 362.71 l 663.96 358.09 l 663.63 353.5 l 663.22 348.94 l 662.72 344.43 l 662.14 339.97 l 661.48 335.57 l 660.75 331.25 l 659.94 327.01 l 659.07 322.86 l 658.13 318.81 l 657.13 314.87 l 656.07 311.04 l 654.95 307.35 l 653.79 303.78 l 652.56 300.36 l 651.29 297.1 l 649.98 293.99 l 649.31 292.5 l 648.62 291.06 l 647.94 289.66 l 647.24 288.31 l 646.53 287 l 645.81 285.74 l 645.08 284.53 l 644.35 283.37 l 643.61 282.27 l 642.86 281.22 l 642.1 280.22 l 641.33 279.27 l 640.56 278.39 l 639.78 277.56 l 639.01 276.78 l 638.22 276.06 l 637.42 275.41 l 636.62 274.82 l 636.59 274.8 636.56 274.79 636.53 274.77 c 634.97 274.07 l 634.56 274.98 l 636.12 275.68 l 636.03 275.63 l 636.79 276.18 l 637.55 276.81 l 638.3 277.49 l 639.05 278.24 l 639.81 279.04 l 640.55 279.9 l 641.3 280.83 l 642.04 281.8 l 642.78 282.83 l 643.51 283.91 l 644.23 285.05 l 644.94 286.24 l 645.65 287.48 l 646.35 288.77 l 647.04 290.1 l 647.72 291.48 l 648.4 292.92 l 649.06 294.38 l 650.36 297.46 l 651.62 300.7 l 652.83 304.09 l 653.99 307.64 l 655.11 311.31 l 656.16 315.12 l 657.16 319.04 l 658.09 323.07 l 658.96 327.2 l 659.76 331.42 l 660.5 335.72 l 661.15 340.1 l 661.73 344.54 l 662.22 349.03 l 662.64 353.57 l 662.97 358.14 l 663.21 362.75 l 663.35 367.36 l 663.39 372.02 l 663.33 376.64 l 663.13 381.25 l 662.81 385.85 l 662.37 390.42 l 661.81 394.95 l 661.13 399.44 l 660.35 403.87 l 659.46 408.25 l 658.47 412.55 l 657.39 416.77 l 656.22 420.89 l 654.95 424.92 l 653.61 428.84 l 652.18 432.64 l 650.68 436.31 l 649.1 439.85 l 647.47 443.23 l 645.77 446.47 l 644 449.55 l 643.1 451.02 l 642.19 452.45 l 641.27 453.83 l 640.33 455.17 l 639.38 456.45 l 638.42 457.69 l 637.46 458.88 l 636.49 460.02 l 635.5 461.11 l 634.5 462.14 l 633.5 463.11 l 632.5 464.03 l 631.48 464.89 l 630.46 465.7 l 629.44 466.45 l 628.41 467.14 l 627.37 467.76 l 626.35 468.33 l 625.31 468.83 l 624.27 469.26 l 623.23 469.64 l 622.18 469.94 l 621.14 470.18 l 620.1 470.36 l 619.05 470.46 l 617.98 470.5 l 618.02 471.5 l h 636.63 271.97 m 630 273 l 634.8 277.68 l 636.63 271.97 l h f 618.04 454.12 m 618.98 454.09 l 620.01 453.99 l 621.02 453.82 l 622.03 453.58 l 623.04 453.27 l 624.04 452.91 l 624.97 452.51 l 624.08 450.44 l 623.26 450.8 l 622.38 451.12 l 621.51 451.39 l 620.63 451.6 l 619.77 451.75 l 618.91 451.85 l 617.96 451.88 l 618.04 454.12 l h 627.11 451.37 m 627.97 450.82 l 628.92 450.17 l 629.87 449.45 l 630.82 448.68 l 631.76 447.85 l 632.58 447.07 l 631.03 445.44 l 630.27 446.16 l 629.39 446.94 l 628.52 447.65 l 627.64 448.32 l 626.76 448.92 l 625.9 449.47 l 627.11 451.37 l h 634.19 445.41 m 634.5 445.08 l 635.39 444.07 l 636.28 443 l 637.16 441.88 l 638.02 440.73 l 638.51 440.04 l 636.68 438.73 l 636.22 439.38 l 635.38 440.5 l 634.55 441.57 l 633.71 442.58 l 632.85 443.55 l 632.55 443.88 l 634.19 445.41 l h 639.79 438.14 m 640.54 437.01 l 642.16 434.32 l 643.29 432.27 l 641.32 431.18 l 640.23 433.16 l 638.66 435.77 l 637.91 436.9 l 639.79 438.14 l h 644.36 430.24 m 645.25 428.48 l 646.72 425.35 l 647.27 424.07 l 645.2 423.18 l 644.68 424.4 l 643.25 427.46 l 642.35 429.22 l 644.36 430.24 l h 648.17 421.97 m 649.45 418.71 l 650.57 415.63 l 648.45 414.87 l 647.36 417.89 l 646.07 421.15 l 648.17 421.97 l h 651.3 413.47 m 651.92 411.61 l 653.04 407.91 l 653.3 406.96 l 651.13 406.37 l 650.88 407.25 l 649.78 410.9 l 649.16 412.76 l 651.3 413.47 l h 653.89 404.8 m 654.08 404.11 l 655.05 400.24 l 655.5 398.18 l 653.3 397.7 l 652.86 399.7 l 651.91 403.52 l 651.72 404.2 l 653.89 404.8 l h 655.98 395.96 m 656.71 392.28 l 657.21 389.29 l 654.99 388.92 l 654.5 391.84 l 653.77 395.52 l 655.98 395.96 l h 657.56 387.04 m 657.99 384.09 l 658.44 380.32 l 656.21 380.05 l 655.77 383.76 l 655.34 386.72 l 657.56 387.04 l h 658.67 378.05 m 658.88 375.73 l 659.17 371.51 l 659.18 371.26 l 656.93 371.17 l 656.93 371.35 l 656.64 375.52 l 656.43 377.84 l 658.67 378.05 l h 659.27 369.01 m 659.34 367.26 l 659.4 363.02 l 659.4 362.22 l 657.15 362.23 l 657.15 362.98 l 657.09 367.17 l 657.02 368.93 l 659.27 369.01 l h 659.38 359.97 m 659.38 358.78 l 659.25 354.54 l 659.19 353.17 l 656.94 353.28 l 657 354.6 l 657.13 358.79 l 657.13 359.98 l 659.38 359.97 l h 659.08 350.93 m 659.05 350.33 l 658.77 346.14 l 658.61 344.15 l 656.37 344.34 l 656.53 346.29 l 656.81 350.43 l 656.83 351.03 l 659.08 350.93 l h 658.42 341.89 m 658.01 337.87 l 657.69 335.16 l 655.45 335.43 l 655.78 338.1 l 656.18 342.12 l 658.42 341.89 l h 657.4 332.91 m 656.97 329.8 l 656.41 326.21 l 654.19 326.56 l 654.75 330.11 l 655.17 333.21 l 657.4 332.91 l h 656.03 323.97 m 655.69 321.99 l 654.95 318.21 l 654.76 317.3 l 652.56 317.77 l 652.75 318.63 l 653.47 322.38 l 653.81 324.36 l 656.03 323.97 l h 654.29 315.1 m 654.17 314.51 l 653.33 310.92 l 652.71 308.49 l 650.53 309.05 l 651.14 311.43 l 651.97 314.98 l 652.09 315.57 l 654.29 315.1 l h 652.13 306.29 m 651.51 304.05 l 650.52 300.8 l 650.19 299.78 l 648.05 300.48 l 648.37 301.45 l 649.34 304.65 l 649.96 306.9 l 652.13 306.29 l h 649.48 297.61 m 648.44 294.69 l 647.34 291.85 l 647.08 291.23 l 645 292.11 l 645.24 292.67 l 646.32 295.45 l 647.36 298.37 l 649.48 297.61 l h 646.18 289.13 m 645.03 286.65 l 644.43 285.44 l 643.83 284.29 l 643.21 283.17 l 643.11 283 l 641.17 284.14 l 641.24 284.26 l 641.84 285.33 l 642.42 286.45 l 642.99 287.6 l 644.14 290.08 l 646.18 289.13 l h 641.92 281.02 m 641.33 280.12 l 640.69 279.2 l 640.04 278.32 l 639.38 277.49 l 638.71 276.71 l 638.05 275.99 l 637.59 275.55 l 636.02 277.16 l 636.4 277.52 l 637.01 278.18 l 637.62 278.89 l 638.23 279.66 l 638.84 280.48 l 639.45 281.35 l 640.04 282.26 l 641.92 281.02 l h 637.54 272.67 m 630 273 l 634.78 278.84 l 637.54 272.67 l h f 617.98 238.13 m 619.38 238.15 l 620.75 238.23 l 622.1 238.35 l 623.46 238.52 l 624.54 238.69 l 624.89 236.47 l 623.73 236.29 l 622.31 236.11 l 620.88 235.98 l 619.42 235.9 l 618.02 235.88 l 617.98 238.13 l h 626.65 239.13 m 628.75 239.64 l 631.27 240.44 l 632.95 241.09 l 633.76 238.99 l 631.94 238.29 l 629.28 237.45 l 627.19 236.94 l 626.65 239.13 l h 634.94 241.96 m 635.96 242.44 l 638.08 243.61 l 639.06 244.22 l 640.01 244.87 l 640.55 245.27 l 641.89 243.46 l 641.27 243.01 l 640.25 242.32 l 639.17 241.64 l 636.91 240.4 l 635.89 239.92 l 634.94 241.96 l h 642.21 246.63 m 642.54 246.92 l 643.27 247.64 l 643.95 248.37 l 644.55 249.11 l 645.1 249.85 l 645.56 250.6 l 645.97 251.35 l 646.05 251.54 l 648.1 250.62 l 647.95 250.28 l 647.47 249.4 l 646.91 248.52 l 646.29 247.68 l 645.6 246.84 l 644.85 246.04 l 644.04 245.24 l 643.71 244.95 l 642.21 246.63 l h 646.71 253.48 m 646.74 253.59 l 646.84 254.33 l 646.88 255.06 l 646.85 255.81 l 646.77 256.58 l 646.65 257.36 l 646.49 258.13 l 646.29 258.9 l 646.09 259.49 l 648.23 260.2 l 648.47 259.47 l 648.7 258.59 l 648.88 257.7 l 649.01 256.8 l 649.1 255.87 l 649.12 254.94 l 649.07 253.99 l 648.92 253.04 l 648.89 252.93 l 646.71 253.48 l h 645.3 261.39 m 644.64 262.64 l 643.73 264.04 l 642.69 265.37 l 641.55 266.61 l 641.55 266.61 l 643.13 268.21 l 643.2 268.14 l 644.47 266.75 l 645.62 265.26 l 646.63 263.68 l 647.29 262.44 l 645.3 261.39 l h 640 267.98 m 638.96 268.79 l 637.55 269.69 l 636.08 270.46 l 636.35 270.36 l 635.22 270.63 l 635.74 272.82 l 636.87 272.55 l 636.96 272.53 637.05 272.49 637.13 272.45 c 638.77 271.58 l 640.34 270.57 l 641.38 269.76 l 640 267.98 l h 635.81 268.18 m 630 273 l 637.34 274.76 l 635.81 268.18 l h f 617.96 219.5 m 620.65 219.69 l 623.26 220.26 l 625.86 221.2 l 628.47 222.48 l 631.05 224.11 l 633.62 226.07 l 636.16 228.36 l 638.67 230.95 l 641.15 233.85 l 643.58 237.02 l 645.96 240.47 l 648.29 244.18 l 650.55 248.15 l 652.75 252.34 l 654.88 256.76 l 656.93 261.39 l 658.88 266.22 l 660.76 271.23 l 662.55 276.43 l 664.23 281.78 l 665.81 287.27 l 667.28 292.9 l 668.63 298.66 l 669.87 304.54 l 670.98 310.5 l 671.95 316.56 l 672.79 322.69 l 673.49 328.88 l 674.04 335.11 l 674.45 341.39 l 674.7 347.7 l 674.78 354.01 l 674.69 360.32 l 674.45 366.62 l 674.05 372.9 l 673.5 379.13 l 672.79 385.32 l 671.95 391.45 l 670.98 397.51 l 669.87 403.48 l 668.65 409.35 l 667.29 415.11 l 665.82 420.74 l 664.25 426.24 l 662.57 431.59 l 660.79 436.78 l 658.92 441.79 l 656.96 446.62 l 654.91 451.25 l 652.79 455.68 l 650.59 459.87 l 648.33 463.84 l 646.01 467.55 l 643.64 471 l 641.21 474.18 l 638.73 477.07 l 636.22 479.67 l 633.68 481.95 l 631.11 483.92 l 628.52 485.55 l 625.92 486.83 l 626 486.8 l 622.92 487.71 l 623.2 488.67 l 626.28 487.75 l 626.31 487.75 626.33 487.74 626.36 487.72 c 629.05 486.39 l 631.71 484.71 l 634.35 482.7 l 636.94 480.36 l 639.49 477.72 l 642 474.78 l 644.46 471.57 l 646.86 468.08 l 649.2 464.33 l 651.48 460.33 l 653.69 456.11 l 655.82 451.66 l 657.88 447 l 659.85 442.14 l 661.73 437.1 l 663.52 431.89 l 665.21 426.51 l 666.79 421 l 668.26 415.34 l 669.62 409.56 l 670.86 403.66 l 671.97 397.67 l 672.95 391.59 l 673.79 385.44 l 674.49 379.22 l 675.05 372.96 l 675.45 366.66 l 675.69 360.33 l 675.78 353.99 l 675.69 347.66 l 675.45 341.33 l 675.04 335.03 l 674.48 328.77 l 673.79 322.55 l 672.94 316.4 l 671.96 310.32 l 670.85 304.33 l 669.61 298.43 l 668.25 292.65 l 666.77 286.99 l 665.19 281.48 l 663.5 276.1 l 661.7 270.88 l 659.81 265.84 l 657.84 260.99 l 655.78 256.33 l 653.63 251.87 l 651.42 247.65 l 649.14 243.65 l 646.78 239.9 l 644.38 236.41 l 641.91 233.19 l 639.39 230.25 l 636.83 227.61 l 634.23 225.28 l 631.59 223.26 l 628.91 221.58 l 626.2 220.25 l 623.47 219.28 l 620.72 218.7 l 618.04 218.5 l 617.96 219.5 l h 623.56 485.06 m 618.13 489 l 624.54 490.98 l 623.56 485.06 l h f 617.97 201.5 m 621.09 201.71 l 624.14 202.32 l 627.19 203.31 l 630.22 204.69 l 633.24 206.44 l 636.23 208.53 l 639.2 210.97 l 642.12 213.74 l 645 216.83 l 647.83 220.22 l 650.6 223.9 l 653.31 227.86 l 655.95 232.08 l 658.5 236.57 l 660.97 241.28 l 663.36 246.22 l 665.64 251.37 l 667.82 256.72 l 669.9 262.26 l 671.86 267.96 l 673.7 273.82 l 675.4 279.83 l 676.98 285.98 l 678.42 292.24 l 679.71 298.6 l 680.84 305.06 l 681.83 311.6 l 682.63 318.2 l 683.28 324.86 l 683.75 331.55 l 684.03 338.27 l 684.13 345.01 l 684.03 351.74 l 683.75 358.46 l 683.28 365.16 l 682.64 371.81 l 681.82 378.41 l 680.85 384.95 l 679.71 391.41 l 678.42 397.78 l 676.99 404.03 l 675.42 410.18 l 673.71 416.19 l 671.88 422.06 l 669.92 427.76 l 667.85 433.29 l 665.67 438.64 l 663.39 443.8 l 661.01 448.74 l 658.54 453.45 l 655.99 457.94 l 653.36 462.16 l 650.65 466.12 l 647.89 469.8 l 645.06 473.19 l 642.18 476.28 l 639.26 479.05 l 636.29 481.5 l 633.3 483.59 l 630.28 485.33 l 627.24 486.71 l 624.2 487.7 l 624.28 487.68 l 623.01 487.86 l 623.16 488.85 l 624.42 488.67 l 624.45 488.67 624.48 488.66 624.51 488.65 c 627.66 487.62 l 630.78 486.2 l 633.87 484.41 l 636.93 482.27 l 639.94 479.78 l 642.91 476.97 l 645.83 473.83 l 648.68 470.4 l 651.48 466.68 l 654.21 462.68 l 656.86 458.43 l 659.42 453.92 l 661.91 449.17 l 664.3 444.2 l 666.6 439.02 l 668.79 433.65 l 670.87 428.08 l 672.83 422.35 l 674.67 416.46 l 676.38 410.43 l 677.96 404.26 l 679.4 397.97 l 680.7 391.59 l 681.84 385.1 l 682.82 378.53 l 683.63 371.91 l 684.28 365.22 l 684.75 358.51 l 685.03 351.76 l 685.13 344.99 l 685.03 338.23 l 684.75 331.48 l 684.28 324.76 l 683.63 318.08 l 682.81 311.45 l 681.83 304.89 l 680.69 298.4 l 679.39 292.01 l 677.95 285.73 l 676.37 279.56 l 674.65 273.53 l 672.8 267.63 l 670.84 261.9 l 668.75 256.34 l 666.55 250.97 l 664.26 245.78 l 661.86 240.81 l 659.37 236.07 l 656.79 231.55 l 654.14 227.3 l 651.4 223.3 l 648.6 219.58 l 645.73 216.15 l 642.81 213.01 l 639.83 210.2 l 636.8 207.71 l 633.74 205.57 l 630.63 203.78 l 627.5 202.36 l 624.34 201.33 l 621.15 200.71 l 618.03 200.5 l 617.97 201.5 l h 623.69 485.25 m 618.13 489 l 624.46 491.2 l 623.69 485.25 l h f 617.98 141.5 m 618.69 141.52 l 619.35 141.59 l 620.02 141.71 l 620.7 141.86 l 621.37 142.06 l 622.04 142.31 l 623.38 142.94 l 624.72 143.72 l 626.05 144.67 l 627.37 145.78 l 628.67 147.03 l 629.95 148.43 l 631.22 149.98 l 632.46 151.65 l 633.67 153.46 l 634.85 155.39 l 636 157.43 l 637.11 159.58 l 638.17 161.84 l 639.2 164.2 l 640.18 166.63 l 641.11 169.17 l 641.99 171.78 l 642.81 174.45 l 643.58 177.2 l 644.29 180.01 l 644.93 182.88 l 645.51 185.79 l 646.02 188.74 l 646.46 191.73 l 646.83 194.75 l 647.12 197.79 l 647.33 200.85 l 647.46 203.93 l 647.5 207.01 l 647.48 210.09 l 647.39 213.17 l 647.27 216.23 l 647.1 219.28 l 646.88 222.31 l 646.61 225.3 l 646.3 228.26 l 645.96 231.17 l 645.57 234.05 l 645.14 236.86 l 644.68 239.61 l 644.19 242.29 l 643.65 244.9 l 643.09 247.44 l 642.51 249.89 l 641.89 252.25 l 641.25 254.51 l 640.58 256.67 l 639.89 258.72 l 639.18 260.65 l 638.45 262.46 l 637.7 264.13 l 636.95 265.69 l 636.17 267.09 l 635.39 268.34 l 635.46 268.25 l 633.83 269.91 l 634.54 270.61 l 636.17 268.96 l 636.19 268.93 636.22 268.9 636.24 268.87 c 637.04 267.57 l 637.84 266.12 l 638.62 264.54 l 639.38 262.83 l 640.12 260.99 l 640.84 259.04 l 641.54 256.96 l 642.21 254.78 l 642.86 252.5 l 643.48 250.12 l 644.07 247.66 l 644.63 245.1 l 645.17 242.48 l 645.67 239.78 l 646.13 237.01 l 646.56 234.18 l 646.95 231.29 l 647.3 228.36 l 647.61 225.39 l 647.88 222.38 l 648.09 219.34 l 648.27 216.28 l 648.39 213.19 l 648.48 210.09 l 648.5 206.99 l 648.45 203.89 l 648.33 200.79 l 648.12 197.7 l 647.82 194.63 l 647.45 191.58 l 647.01 188.57 l 646.5 185.59 l 645.91 182.66 l 645.26 179.77 l 644.54 176.93 l 643.77 174.16 l 642.94 171.45 l 642.05 168.83 l 641.11 166.26 l 640.12 163.8 l 639.08 161.41 l 638 159.12 l 636.87 156.94 l 635.7 154.87 l 634.5 152.9 l 633.26 151.06 l 631.99 149.35 l 630.69 147.76 l 629.36 146.31 l 628.01 145.01 l 626.63 143.86 l 625.23 142.86 l 623.81 142.03 l 622.38 141.37 l 621.65 141.11 l 620.92 140.89 l 620.19 140.72 l 619.46 140.6 l 618.72 140.52 l 618.02 140.5 l 617.98 141.5 l h 633.38 267.2 m 630 273 l 636.66 272.22 l 633.38 267.2 l h f 617.99 123.5 m 618.93 123.52 l 619.86 123.6 l 620.78 123.71 l 621.71 123.87 l 622.62 124.07 l 623.54 124.32 l 625.38 124.96 l 627.21 125.75 l 629.01 126.7 l 630.8 127.82 l 632.56 129.08 l 634.3 130.48 l 636.01 132.03 l 637.68 133.71 l 639.31 135.52 l 640.91 137.45 l 642.45 139.49 l 643.94 141.64 l 645.38 143.89 l 646.77 146.25 l 648.09 148.69 l 649.34 151.22 l 650.52 153.82 l 651.63 156.5 l 652.66 159.24 l 653.62 162.05 l 654.48 164.91 l 655.26 167.82 l 655.94 170.77 l 656.54 173.75 l 657.02 176.77 l 657.41 179.81 l 657.69 182.87 l 657.87 185.94 l 657.92 189.01 l 657.89 192.09 l 657.72 195.15 l 657.43 198.21 l 657.04 201.24 l 656.55 204.26 l 655.96 207.25 l 655.28 210.19 l 654.5 213.1 l 653.63 215.97 l 652.69 218.77 l 651.65 221.52 l 650.55 224.19 l 649.36 226.8 l 648.11 229.33 l 646.8 231.77 l 645.42 234.12 l 643.98 236.38 l 642.49 238.53 l 640.95 240.58 l 639.36 242.5 l 637.73 244.31 l 636.06 245.98 l 634.35 247.54 l 632.62 248.94 l 630.86 250.2 l 629.07 251.31 l 627.27 252.27 l 625.45 253.06 l 625.52 253.03 l 622.93 253.74 l 623.2 254.7 l 625.78 254 l 625.8 253.99 625.83 253.98 625.85 253.97 c 627.74 253.15 l 629.6 252.16 l 631.44 251.01 l 633.25 249.72 l 635.02 248.28 l 636.77 246.69 l 638.47 244.98 l 640.13 243.14 l 641.75 241.18 l 643.31 239.1 l 644.82 236.92 l 646.28 234.63 l 647.67 232.24 l 649.01 229.77 l 650.27 227.21 l 651.47 224.58 l 652.59 221.87 l 653.63 219.09 l 654.59 216.26 l 655.47 213.36 l 656.25 210.42 l 656.94 207.44 l 657.54 204.43 l 658.04 201.37 l 658.43 198.3 l 658.71 195.21 l 658.89 192.09 l 658.92 188.99 l 658.86 185.88 l 658.69 182.77 l 658.4 179.68 l 658.01 176.61 l 657.52 173.56 l 656.92 170.54 l 656.22 167.56 l 655.44 164.62 l 654.56 161.73 l 653.6 158.89 l 652.56 156.12 l 651.43 153.41 l 650.23 150.78 l 648.96 148.21 l 647.63 145.74 l 646.22 143.36 l 644.77 141.07 l 643.25 138.88 l 641.68 136.81 l 640.05 134.84 l 638.39 133 l 636.68 131.29 l 634.93 129.71 l 633.14 128.26 l 631.33 126.97 l 629.48 125.82 l 627.6 124.83 l 625.71 124.01 l 623.8 123.36 l 622.84 123.1 l 621.87 122.88 l 620.91 122.72 l 619.94 122.6 l 618.96 122.52 l 618.01 122.5 l 617.99 123.5 l h 623.59 251.1 m 618.13 255 l 624.52 257.03 l 623.59 251.1 l h f 617.99 105.5 m 619.13 105.53 l 620.25 105.6 l 621.38 105.74 l 622.49 105.92 l 623.61 106.16 l 624.73 106.44 l 625.84 106.78 l 626.95 107.16 l 628.06 107.59 l 629.17 108.06 l 630.26 108.59 l 631.35 109.15 l 633.53 110.42 l 635.66 111.86 l 637.77 113.46 l 639.84 115.22 l 641.86 117.13 l 643.84 119.19 l 645.76 121.39 l 647.63 123.71 l 649.43 126.15 l 651.18 128.72 l 652.85 131.39 l 654.44 134.18 l 655.96 137.05 l 657.39 140.01 l 658.73 143.06 l 659.98 146.18 l 661.13 149.38 l 662.18 152.62 l 663.12 155.93 l 663.95 159.28 l 664.66 162.68 l 665.26 166.11 l 665.73 169.57 l 666.06 173.04 l 666.27 176.53 l 666.34 180.03 l 666.29 183.51 l 666.09 186.99 l 665.74 190.47 l 665.27 193.92 l 664.67 197.35 l 663.97 200.75 l 663.14 204.1 l 662.2 207.4 l 661.14 210.66 l 659.99 213.84 l 658.75 216.96 l 657.41 220.01 l 655.98 222.98 l 654.47 225.85 l 652.88 228.62 l 651.21 231.3 l 649.47 233.86 l 647.66 236.31 l 645.8 238.64 l 643.88 240.83 l 641.9 242.89 l 639.89 244.8 l 637.82 246.56 l 635.72 248.16 l 633.58 249.6 l 631.42 250.86 l 630.34 251.42 l 629.24 251.95 l 628.14 252.42 l 627.04 252.85 l 625.93 253.23 l 624.82 253.56 l 623 253.9 l 623.18 254.88 l 625.1 254.52 l 626.26 254.17 l 627.4 253.78 l 628.53 253.34 l 629.67 252.85 l 630.8 252.31 l 631.92 251.73 l 634.14 250.43 l 636.33 248.96 l 638.47 247.32 l 640.57 245.52 l 642.62 243.58 l 644.63 241.48 l 646.58 239.26 l 648.47 236.91 l 650.3 234.42 l 652.05 231.83 l 653.74 229.12 l 655.35 226.31 l 656.88 223.41 l 658.33 220.41 l 659.68 217.33 l 660.94 214.18 l 662.1 210.96 l 663.16 207.68 l 664.11 204.34 l 664.94 200.95 l 665.66 197.52 l 666.26 194.06 l 666.74 190.56 l 667.08 187.05 l 667.29 183.52 l 667.34 180.01 l 667.27 176.48 l 667.06 172.95 l 666.72 169.43 l 666.24 165.94 l 665.64 162.47 l 664.92 159.05 l 664.08 155.65 l 663.13 152.31 l 662.07 149.03 l 660.91 145.81 l 659.65 142.66 l 658.29 139.57 l 656.84 136.58 l 655.31 133.68 l 653.7 130.87 l 652.01 128.16 l 650.24 125.56 l 648.41 123.08 l 646.52 120.73 l 644.56 118.5 l 642.55 116.4 l 640.49 114.46 l 638.37 112.66 l 636.22 111.03 l 634.03 109.56 l 631.81 108.26 l 630.69 107.68 l 629.56 107.14 l 628.42 106.66 l 627.28 106.22 l 626.13 105.82 l 624.98 105.48 l 623.82 105.18 l 622.66 104.93 l 621.49 104.74 l 620.32 104.61 l 619.16 104.53 l 618.01 104.5 l 617.99 105.5 l h 623.72 251.29 m 618.13 255 l 624.45 257.24 l 623.72 251.29 l h f 216.22 387.45 m 487.71 257.61 l 487.27 256.71 l 215.78 386.55 l 216.22 387.45 l h 487.88 260.3 m 492 255 l 485.29 254.88 l 487.88 260.3 l h f 216.26 423.43 m 487.99 258.03 l 487.47 257.17 l 215.74 422.57 l 216.26 423.43 l h 488.43 260.68 m 492 255 l 485.31 255.56 l 488.43 260.68 l h f 216.24 405.44 m 487.85 257.83 l 487.37 256.95 l 215.76 404.56 l 216.24 405.44 l h 488.16 260.5 m 492 255 l 485.3 255.23 l 488.16 260.5 l h f 216.32 483.39 m 488.46 258.57 l 487.83 257.8 l 215.68 482.61 l 216.32 483.39 l h 489.28 261.13 m 492 255 l 485.46 256.51 l 489.28 261.13 l h f /DeviceGray {} CS [0] SC 492 54 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 516.55 58.32] Tm 0 0 Td /DeviceGray {} cs [0] sc /DeviceGray {} CS [0] SC 0 Tc /F5_0 15.96 Tf (Go) 19.152 Tj -2 TJm (to) 19.152 Tj -2 TJm (St) 19.152 Tj -2 TJm (m) 9.576 Tj -8 TJm (t) 9.576 Tj /DeviceGray {} CS [0] SC 492 36 126 18 re S [1 0 0 1 0 0] Tm 0 0 Td [1 0 0 1 530.98 40.32] Tm 0 0 Td /DeviceGray {} CS [0] SC 0.024 Tc /F7_0 15.96 Tf (label) 47.88 Tj /DeviceGray {} cs [0] sc 617.98 45.5 m 619.32 45.545 l 620.63 45.663 l 621.94 45.862 l 623.24 46.142 l 624.55 46.502 l 625.85 46.93 l 627.16 47.438 l 628.45 48.015 l 629.74 48.671 l 631.03 49.396 l 632.32 50.189 l 633.6 51.048 l 634.87 51.981 l 636.13 52.975 l 637.39 54.043 l 638.64 55.167 l 639.88 56.356 l 641.1 57.605 l 642.32 58.922 l 643.53 60.293 l 644.72 61.716 l 645.9 63.199 l 647.07 64.742 l 648.22 66.331 l 649.36 67.98 l 650.48 69.673 l 651.58 71.42 l 652.66 73.218 l 653.73 75.056 l 654.79 76.946 l 656.83 80.856 l 658.78 84.929 l 660.65 89.16 l 662.43 93.541 l 664.11 98.056 l 665.68 102.69 l 667.15 107.45 l 668.5 112.31 l 669.72 117.26 l 670.83 122.3 l 671.8 127.41 l 672.65 132.58 l 673.34 137.8 l 673.9 143.07 l 674.29 148.36 l 674.54 153.68 l 674.62 159.01 l 674.55 164.33 l 674.36 169.65 l 674.04 174.95 l 673.61 180.22 l 673.06 185.45 l 672.4 190.62 l 671.63 195.74 l 670.75 200.77 l 669.78 205.73 l 668.71 210.59 l 667.55 215.35 l 666.31 219.99 l 664.98 224.51 l 663.58 228.89 l 662.1 233.12 l 660.55 237.2 l 658.94 241.11 l 658.11 242.99 l 657.27 244.83 l 656.41 246.63 l 655.53 248.38 l 654.65 250.07 l 653.75 251.72 l 652.84 253.31 l 651.92 254.86 l 650.99 256.34 l 650.04 257.76 l 649.09 259.13 l 648.13 260.45 l 647.16 261.7 l 646.18 262.89 l 645.19 264.01 l 644.21 265.08 l 643.21 266.07 l 642.2 267 l 641.2 267.86 l 640.18 268.65 l 639.17 269.37 l 638.15 270.02 l 637.13 270.59 l 636.11 271.1 l 636.2 271.06 l 634.75 271.47 l 635.02 272.43 l 636.46 272.03 l 636.49 272.02 636.52 272.01 636.55 271.99 c 637.62 271.46 l 638.68 270.86 l 639.75 270.18 l 640.8 269.43 l 641.84 268.62 l 642.88 267.73 l 643.91 266.78 l 644.94 265.76 l 645.95 264.67 l 646.95 263.52 l 647.95 262.31 l 648.94 261.04 l 649.91 259.7 l 650.88 258.31 l 651.84 256.87 l 652.78 255.37 l 653.71 253.81 l 654.63 252.2 l 655.54 250.54 l 656.43 248.83 l 657.31 247.06 l 658.17 245.25 l 659.03 243.4 l 659.86 241.49 l 661.49 237.55 l 663.04 233.45 l 664.53 229.19 l 665.94 224.79 l 667.28 220.25 l 668.53 215.59 l 669.69 210.8 l 670.76 205.92 l 671.73 200.94 l 672.61 195.88 l 673.39 190.75 l 674.05 185.56 l 674.61 180.3 l 675.04 175.01 l 675.36 169.69 l 675.55 164.35 l 675.62 158.99 l 675.54 153.64 l 675.29 148.29 l 674.89 142.97 l 674.33 137.67 l 673.63 132.42 l 672.78 127.22 l 671.81 122.08 l 670.69 117.02 l 669.46 112.04 l 668.11 107.16 l 666.63 102.37 l 665.04 97.709 l 663.36 93.165 l 661.57 88.756 l 659.69 84.496 l 657.71 80.394 l 655.66 76.459 l 654.6 74.554 l 653.52 72.702 l 652.43 70.885 l 651.31 69.122 l 650.18 67.411 l 649.03 65.745 l 647.87 64.138 l 646.68 62.577 l 645.49 61.074 l 644.28 59.632 l 643.06 58.243 l 641.82 56.905 l 640.57 55.634 l 639.3 54.423 l 638.03 53.282 l 636.75 52.19 l 635.46 51.174 l 634.16 50.217 l 632.84 49.337 l 631.52 48.524 l 630.2 47.779 l 628.86 47.101 l 627.52 46.507 l 626.17 45.98 l 624.82 45.538 l 623.45 45.164 l 622.09 44.873 l 620.72 44.667 l 619.35 44.545 l 618.02 44.5 l 617.98 45.5 l h 635.23 268.8 m 630 273 l 636.5 274.67 l 635.23 268.8 l h f Q showpage %%PageTrailer pdfEndPage %%Trailer end %%DocumentSuppliedResources: %%EOF
PostScript
0
jhh67/chapel
doc/rst/developer/implementation/compilerOverview/AST.ps
[ "ECL-2.0", "Apache-2.0" ]
# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=7 inherit cargo git-r3 CARGO_FETCH_CRATES=yes DESCRIPTION="A modern editor with a backend written in Rust" HOMEPAGE="https://xi-editor.github.io/xi-editor/" LICENSE="Apache-2.0" SLOT="0" KEYWORDS="" IUSE="+syntect" RESTRICT="network-sandbox" EGIT_REPO_URI="https://github.com/xi-editor/xi-editor.git" DEPEND="" RDEPEND="" S=${WORKDIR}/${P}/rust src_compile() { debug-print-function ${FUNCNAME} "$@" export CARGO_HOME="${ECARGO_HOME}" cargo build -v -j $(makeopts_jobs) $(usex debug "" --release) \ || die "cargo build failed" if use syntect; then cargo build -v -j $(makeopts_jobs) $(usex debug "" --release) --manifest-path syntect-plugin/Cargo.toml \ || die "cargo build failed" fi } src_install() { einfo "PWD = $(pwd)" debug-print-function ${FUNCNAME} "$@" cargo install --path . -j $(makeopts_jobs) --root="${D}/usr" $(usex debug --debug "") \ || die "cargo install failed" rm -f "${D}/usr/.crates.toml" if use syntect; then insinto /usr/share/xi/plugins/syntect doins syntect-plugin/manifest.toml exeinto /usr/share/xi/plugins/syntect/bin doexe target/release/xi-syntect-plugin fi }
Gentoo Ebuild
4
gentoo/gentoo-rust
app-editors/xi-core/xi-core-9999.ebuild
[ "BSD-3-Clause" ]
(turtle_doc) @scope (subject [ (prefixed_name) (iri_reference) ] @definition.var) [ (prefixed_name) (iri_reference) ] @reference
Scheme
0
yzia2000/nvim-treesitter
queries/turtle/locals.scm
[ "Apache-2.0" ]
import Head from 'next/head' import { Global } from '@emotion/react' import xw from 'xwind' function App({ Component, pageProps }) { return ( <> <Head> <title>Tailwindcss Emotion Example</title> </Head> <Global //tailwind base styles + keyframes + ring and shadow classes variables ... to global styles styles={xw`XWIND_BASE XWIND_GLOBAL`} /> <Component {...pageProps} /> </> ) } export default App
JavaScript
4
blomqma/next.js
examples/with-tailwindcss-emotion/pages/_app.js
[ "MIT" ]
using System; namespace Microsoft.Maui.Controls.Compatibility.Platform.Tizen.TV { public class TVShellRenderer : ShellRenderer { protected override INavigationDrawer CreateNavigationDrawer() { var drawer = new TVNavigationDrawer(Forms.NativeParent); ((IShellController)Element).AddFlyoutBehaviorObserver(drawer); return drawer; } protected override ShellItemRenderer CreateShellItemRenderer(ShellItem item) { return new TVShellItemRenderer(item); } protected override INavigationView CreateNavigationView() { return new TVNavigationView(Forms.NativeParent, Element); } protected override void UpdateFlyoutIsPresented() { NavigationDrawer.IsOpen = Element.FlyoutIsPresented; } } }
C#
3
andres-gimenez/maui
src/Compatibility/Core/src/Tizen/Shell/TV/TVShellRenderer.cs
[ "MIT" ]
\documentclass{article} \usepackage{agda} \usepackage{agdon} \usepackage{bytefield} \hypersetup{ pdftitle={Specification and (nearly complete) Proofs for Registers with Bounded Types}, pdfborder={0 0 0}, breaklinks=true} \title{Specification and (nearly complete) Proofs for Registers with Bounded Types} \author{Dan Pittman dan@auxon.io} \begin{document} \maketitle \begin{abstract} A literate Agda file containing a specification-as-types as well as proofs of the bounds properties of the registers library. \end{abstract} \section{Introduction} Register access and manipulation exists at the lowest levels of a software stack. due to its foundational nature, its correctness should be considered to be of the utmost importance. When software interacts with registers on the hardware, it does so through the manipulation of data referred to by \emph{a priori} specified pointers. It is common practice to treat the data at these pointers as unsigned integers whose width is determined by the register's width. We then naturally arrive at a bounded range of positive integers which can be represented given the number of bits available. Denotationally, we can think of these unsigned integers as the natural numbers less than or equal to some upper bound. \begin{code}[hide] module Bounded where open import Data.Nat hiding (_≥_) open import Data.Nat.Properties open import Relation.Binary.PropositionalEquality hiding (trans) data _≥_ : ℕ → ℕ → Set where n≥z : {y : ℕ} → y ≥ zero s≥s : {x y : ℕ} → x ≥ y → (suc x) ≥ (suc y) \end{code} \section{Ranges} When we think about ranges logically, we'd normally consider them as the set: $$ \text{Range}(l, u) := \{x\ |\ l\ \leqslant\ x\ \leqslant\ u\} $$ However, when working within the confines of Rust's type system, it is easier to consider a range like so: $$ \text{Range}(l, u) := \{x\ |\ x\ \geqslant\ l\ \land\ x\ \leqslant\ u\} $$ The following type represents the statement above. Its constructor requires a proof that $x \geqslant l$ as well as a proof that $x \leq u$. From those proofs, we build a new type, \AgdaDatatype{InRange}, parameterized by its lower bound, the value, and its upper bound. \begin{code} data InRange (l u : ℕ) : Set where in-range : (x : ℕ) → (x ≥ l) → (x ≤ u) → InRange l u get-rv : ∀ {l u} → InRange l u → ℕ get-rv (in-range x _ _ ) = x \end{code} \section{Registers} As stated in the introduction, we intend to enforce some properties about interacting with registers. Typically, a register is made of up fields, which occupy some range of bits present in that register. When reading, writing, or modifying a register, the preferred API is one which delineates the fields such that the programmer can consider the fields' \emph{logical} values, rather than the value relative to their position in the register. In the following section, we will cover the logical representation of these register fields. \subsection{Fields} For simplicity's sake, we will illustrate with an 8-bit register with three fields, \texttt{On}, \texttt{Dead}, and \texttt{Color}. $$ \begin{bytefield}[endianness=little,bitwidth=0.1\linewidth]{8} \bitheader{0-7} \\ \bitbox{1}{\texttt{On}} & \bitbox{1}{\texttt{Dead}} & \bitbox{3}{\texttt{Color}} & \bitbox{3}{Unused} \end{bytefield} $$ When we interact with these fields, we'd like to do so with their logical values—$0$ or $1$ for \texttt{On} and \texttt{Dead}, and the range $0...7$ for \texttt{Color}—as opposed to their values relative to their position in the register. Because of this expectation, we are exposed to the possiblity of invoking a field's API with a value which exceeds its upper bound. Therefore, we'd like for the API we expose to disallow such a possibility altogether, and therefore preventing undefined behavior from rearing its ugly head. To compute a field's range, we take its width in the register in which it resides and use it to compute the maximum logical value. This is a simple base-two shifting operation: $$ (1 << \text{width}) - 1 $$ We'll need to define our own \AgdaFunction{<<}. Once we do, we can define a type which uses \AgdaDatatype{InRange} to represent a field in a register. \begin{code}[hide] --|This is just a dirty implementation of subtraction for ℕ. Please --|note that if it reaches zero on the lhs, it returns 0. This would --|cause a range to have an upper bound of zero, with which we would --|not be able to prove an inductive case. I state this here to --|assuage any worries about the overall soundness. _-_ : ℕ → ℕ → ℕ 0 - y = 0 (suc x) - (suc y) = x - y {-# CATCHALL #-} x - 0 = x \end{code} \begin{code} _<<_ : ℕ → ℕ → ℕ 0 << _ = 0 {-# CATCHALL #-} x << (suc y) = (x * 2) << y {-# CATCHALL #-} x << 0 = x width-max : ℕ → ℕ width-max w = ((1 << w) - 1) data Field : (w o : ℕ) → Set where mk-field : {w o : ℕ} → InRange 0 (width-max w) → Field w o field-mask : ∀ {w o} → Field w o → ℕ field-mask {w} {o} _ = (width-max w) << o \end{code} Now, because \AgdaDatatype{Field} requires an \AgdaDatatype{InRange} proof, we can think it merely a refinement to the more general case we've proven above. Let's prove an example of a field with our register above. We begin with a proof that the third color, whose \texttt{Color}-relevant value is \texttt{2}, does indeed fit into the \texttt{Color} field. \begin{code} color-can-be-two : 2 ≤ (width-max 3) color-can-be-two = s≤s (s≤s z≤n) \end{code} Then, we can use that proof when a constructing a \texttt{Color} field whose value is \texttt{2}. \begin{code} color-is-two : Field 3 2 color-is-two = mk-field (in-range 2 n≥z color-can-be-two) \end{code} \section{A Register is the sum of its parts} We begin with a binary representation of $\mathbb{N}$, where the least significant bit is first. Through this definition, we can do bitwise operations on the registers and their fields. \begin{code} data Bin : Set where end : Bin zero : Bin → Bin one : Bin → Bin inc-bin : Bin → Bin inc-bin end = one end inc-bin (one b) = zero (inc-bin b) inc-bin (zero b) = one b nat→bin : ℕ → Bin nat→bin 0 = end nat→bin (suc n) = inc-bin (nat→bin n) bin→nat : Bin → ℕ bin→nat end = 0 bin→nat (zero b) = 2 * bin→nat b bin→nat (one b) = 1 + 2 * (bin→nat b) \end{code} Next, we prove that our $\mathbb{N} \rightarrow \text{Binary} \rightarrow \mathbb{N}$ conversion abides the initially given $\mathbb{N}$ for all $\mathbb{N}$. \begin{code} lemma-suc-inc : ∀ b → bin→nat (inc-bin b) ≡ suc (bin→nat b) lemma-suc-inc end = refl lemma-suc-inc (zero b) = refl lemma-suc-inc (one b) = begin bin→nat (inc-bin b) + (bin→nat (inc-bin b) + 0) ≡⟨ cong (λ x → ( x + (bin→nat (inc-bin b) + 0))) (lemma-suc-inc b) ⟩ suc (bin→nat b) + (bin→nat (inc-bin b) + 0) ≡⟨ cong (λ x → ( suc (bin→nat b) + (x + 0))) (lemma-suc-inc b) ⟩ suc (bin→nat b) + (suc (bin→nat b) + 0) ≡⟨ cong suc (+-suc (bin→nat b) ((bin→nat b) + 0)) ⟩ suc (suc (bin→nat b + (bin→nat b + 0))) ∎ where open ≡-Reasoning nat→bin→nat : ∀ n → bin→nat (nat→bin n) ≡ n nat→bin→nat zero = refl nat→bin→nat (suc n) = begin bin→nat (nat→bin (suc n)) ≡⟨⟩ bin→nat (inc-bin (nat→bin n)) ≡⟨ lemma-suc-inc (nat→bin n) ⟩ suc (bin→nat (nat→bin n)) ≡⟨ cong suc (nat→bin→nat n) ⟩ suc n ∎ where open ≡-Reasoning _&b_ : Bin → Bin → Bin _ &b end = end (one x) &b (one y) = one (x &b y) (zero x) &b (one y) = zero (x &b y) (one x) &b (zero y) = zero (x &b y) (zero x) &b (zero y) = zero (x &b y) {-# CATCHALL #-} end &b _ = end _&_ : ℕ → ℕ → ℕ x & y = bin→nat ((nat→bin x) &b (nat→bin y)) _>>_ : ℕ → ℕ → ℕ 0 >> _ = 0 (suc x) >> (suc y) = ⌊ (suc x) /2⌋ >> y {-# CATCHALL #-} (suc x) >> 0 = (suc x) \end{code} We know that a \AgdaDatatype{Field} carries with it a proof that its value resides within its bounds. When we consider a register as merely the composite of its fields, we, through construction, have a safe API to the register itself, because our only interaction with the register is through its fields. This can be demonstrated by asserting that the summation of the widths of the fields said to be contained in a register is $\leqslant$ the total width of the register. \begin{code} data Register : (w : ℕ) → Set where end : ∀ {w} → Register w with-field : ∀ {w fw fo : ℕ} → Field fw fo → fw + fo ≤ w → Register w → Register (w - fw) \end{code} Here, the construction of a register is an inductive family where each field added to it deducts from the available width for the register. With this as our type for a register, we know with certitude: \begin{enumerate} \item Only fields which fit in a register can be said to reside within that register, that's the $fw + fo \leqslant w$ part. \item The constraints put on a field by this definition allow us to prove that interaction with fields never contravene their bounds. We demonstrate that with a proof of reading any arbitrary field in any register below in \AgdaFunction{read-prf}. \end{enumerate} The operation $(\text{RegVal } \&\ \text{FieldMask}) >> \text{FieldOffset}$ tells us how to read a field from a register. Before we can get to a proof regarding this operation, we first must get some lemmas out of the way. \begin{code}[hide] --| Here are a few uninteresting proofs needed to build up to our --| final result. &-zero : ∀ n → n & 0 ≡ 0 &-zero zero = refl &-zero (suc n) = refl shl-zero : ∀ n → 0 << n ≡ 0 shl-zero n = refl shr-zero : ∀ n → 0 >> n ≡ 0 shr-zero n = refl width-max-zero : (width-max 0) ≡ 0 width-max-zero = refl postulate &b-≤ : ∀ b c → ((bin→nat b) & (bin→nat c)) ≤ (bin→nat c) postulate >>-≤ : ∀ {n m w} → (n ≤ m) → (n >> w) ≤ (m >> w) postulate suc-<<>>-cancel : ∀ n m → ((suc n) << m) >> m ≡ suc ((n << m) >> m) \end{code} First, we prove that \texttt{\&}-ing any value produces a value less than or equal to that value. \begin{code} &-≤ : ∀ n m → (n & m) ≤ m &-≤ n zero rewrite &-zero n = z≤n &-≤ n (suc m) = begin n & (suc m) ≡⟨ sym (cong (λ x → (x & (suc m))) (nat→bin→nat n)) ⟩ (bin→nat (nat→bin n)) & (suc m) ≡⟨ sym (cong (λ x → ((bin→nat (nat→bin n)) & x)) (nat→bin→nat (suc m))) ⟩ (bin→nat (nat→bin n)) & (bin→nat (nat→bin (suc m))) ≤⟨ &b-≤ (nat→bin n) (nat→bin (suc m)) ⟩ bin→nat (nat→bin (suc m)) ≡⟨ nat→bin→nat (suc m) ⟩ (suc m) ∎ where open ≤-Reasoning \end{code} Next, we prove that a right or left shift by zero preserves the value on the left-hand side. \begin{code} <<-identity : ∀ n → n << 0 ≡ n <<-identity 0 = refl <<-identity (suc n) = refl >>-identity : ∀ n → n >> 0 ≡ n >>-identity 0 = refl >>-identity (suc n) = refl \end{code} Now, a proof that shifting a value left then right by the same value yields the initial value. \begin{code} <<>>-cancel : ∀ n m → (n << m) >> m ≡ n <<>>-cancel 0 m rewrite shl-zero m | shr-zero m = refl <<>>-cancel (suc n) m rewrite suc-<<>>-cancel n m = begin suc ((n << m) >> m) ≡⟨ cong suc (<<>>-cancel n m) ⟩ suc n ∎ where open ≡-Reasoning \end{code} Now, finally, we discharge each of those lemmas in a proof that register reads abide their bounds. \begin{code} read-prf : ∀ fw rv fo → (rv & ((width-max fw) << fo)) >> fo ≤ (width-max fw) read-prf zero rv fo rewrite width-max-zero | shl-zero fo | &-zero rv | shr-zero fo = z≤n read-prf (suc fw) rv fo = begin (rv & ((width-max (suc fw)) << fo)) >> fo ≤⟨ >>-≤ (&-≤ rv ((width-max (suc fw) << fo))) ⟩ ((width-max (suc fw)) << fo) >> fo ≡⟨ <<>>-cancel (width-max (suc fw)) fo ⟩ width-max (suc fw) ∎ where open ≤-Reasoning \end{code} \end{document}
Literate Agda
5
quahad/bounded-registers
proof/Bounded.lagda
[ "MIT" ]
%!PS-Adobe-3.0 Resource-Encoding %%Title: VIM-cp1257 %%Version: 1.0 0 %%EndComments /VIM-cp1257[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef /quotesinglbase /.notdef /quotedblbase /ellipsis /dagger /daggerdbl /.notdef /perthousand /.notdef /guilsinglleft /.notdef /.notdef /.notdef /.notdef /.notdef /quoteleft /quoteright /quotedblleft /quotedblright /bullet /endash /emdash /.notdef /trademark /.notdef /guilsinglright /.notdef /.notdef /.notdef /.notdef /space /caron /breve /sterling /currency /.notdef /brokenbar /section /dieresis /copyright /Rcedilla /guillemotleft /logicalnot /hyphen /registered /AE /degree /plusminus /ogonek /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /rcedilla /guillemotright /onequarter /onehalf /threequarters /ae /Aogonek /Iogonek /Amacron /Cacute /Adieresis /Aring /Eogonek /Emacron /Ccaron /Eacute /Zacute /Edot /Gcedilla /Kcedilla /Imacron /Lcedilla /Scaron /Nacute /Ncedilla /Oacute /Omacron /Otilde /Odieresis /multiply /Uogonek /Lslash /Sacute /Umacron /Udieresis /Zdotaccent /Zcaron /germandbls /aogonek /iogonek /amacron /cacute /adieresis /aring /eogonek /emacron /ccaron /eacute /zacute /edot /gcedilla /kcedilla /imacron /lcedilla /scaron /nacute /ncedilla /oacute /omacron /otilde /odieresis /divide /uogonek /lslash /sacute /umacron /udieresis /zdotaccent /zcaron /dotaccent] /Encoding defineresource pop % vim:ff=unix: %%EOF
PostScript
1
uga-rosa/neovim
runtime/print/cp1257.ps
[ "Vim" ]
include "java.grm" #pragma -raw -width 32767 redefine program [repeat programelement] end define define programelement [token] [SP] | [key] [SP] end define function main replace [program] P [program] by P end function
TXL
2
pseudoPixels/SourceFlow
txl_features/txl_features/java/token_stream.txl
[ "MIT" ]
-- Copyright 2021 Stanford University, NVIDIA -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- runs-with: -- [["-fcuda", "1", "-ll:gpu", "1"]] import "regent" __demand(__cuda) task f(r : region(ispace(int1d), int)) where reads writes(r) do var arr : int[1088] arr[0] = 1234 arr[1024] = 4321 for e in r do r[e] = arr[0] + arr[1024] end end task toplevel() var r = region(ispace(int1d, 5), int) f(r) regentlib.assert(r[0] == 5555, "test failed") end regentlib.start(toplevel)
Rouge
4
mmccarty/legion
language/tests/cuda/run_pass/argument_spill.rg
[ "Apache-2.0" ]
from unittest.mock import MagicMock, patch from django.db import DEFAULT_DB_ALIAS, connection, connections from django.db.backends.base.base import BaseDatabaseWrapper from django.test import SimpleTestCase, TestCase, skipUnlessDBFeature from ..models import Square class DatabaseWrapperTests(SimpleTestCase): def test_repr(self): conn = connections[DEFAULT_DB_ALIAS] self.assertEqual( repr(conn), f"<DatabaseWrapper vendor={connection.vendor!r} alias='default'>", ) def test_initialization_class_attributes(self): """ The "initialization" class attributes like client_class and creation_class should be set on the class and reflected in the corresponding instance attributes of the instantiated backend. """ conn = connections[DEFAULT_DB_ALIAS] conn_class = type(conn) attr_names = [ ('client_class', 'client'), ('creation_class', 'creation'), ('features_class', 'features'), ('introspection_class', 'introspection'), ('ops_class', 'ops'), ('validation_class', 'validation'), ] for class_attr_name, instance_attr_name in attr_names: class_attr_value = getattr(conn_class, class_attr_name) self.assertIsNotNone(class_attr_value) instance_attr_value = getattr(conn, instance_attr_name) self.assertIsInstance(instance_attr_value, class_attr_value) def test_initialization_display_name(self): self.assertEqual(BaseDatabaseWrapper.display_name, 'unknown') self.assertNotEqual(connection.display_name, 'unknown') class ExecuteWrapperTests(TestCase): @staticmethod def call_execute(connection, params=None): ret_val = '1' if params is None else '%s' sql = 'SELECT ' + ret_val + connection.features.bare_select_suffix with connection.cursor() as cursor: cursor.execute(sql, params) def call_executemany(self, connection, params=None): # executemany() must use an update query. Make sure it does nothing # by putting a false condition in the WHERE clause. sql = 'DELETE FROM {} WHERE 0=1 AND 0=%s'.format(Square._meta.db_table) if params is None: params = [(i,) for i in range(3)] with connection.cursor() as cursor: cursor.executemany(sql, params) @staticmethod def mock_wrapper(): return MagicMock(side_effect=lambda execute, *args: execute(*args)) def test_wrapper_invoked(self): wrapper = self.mock_wrapper() with connection.execute_wrapper(wrapper): self.call_execute(connection) self.assertTrue(wrapper.called) (_, sql, params, many, context), _ = wrapper.call_args self.assertIn('SELECT', sql) self.assertIsNone(params) self.assertIs(many, False) self.assertEqual(context['connection'], connection) def test_wrapper_invoked_many(self): wrapper = self.mock_wrapper() with connection.execute_wrapper(wrapper): self.call_executemany(connection) self.assertTrue(wrapper.called) (_, sql, param_list, many, context), _ = wrapper.call_args self.assertIn('DELETE', sql) self.assertIsInstance(param_list, (list, tuple)) self.assertIs(many, True) self.assertEqual(context['connection'], connection) def test_database_queried(self): wrapper = self.mock_wrapper() with connection.execute_wrapper(wrapper): with connection.cursor() as cursor: sql = 'SELECT 17' + connection.features.bare_select_suffix cursor.execute(sql) seventeen = cursor.fetchall() self.assertEqual(list(seventeen), [(17,)]) self.call_executemany(connection) def test_nested_wrapper_invoked(self): outer_wrapper = self.mock_wrapper() inner_wrapper = self.mock_wrapper() with connection.execute_wrapper(outer_wrapper), connection.execute_wrapper(inner_wrapper): self.call_execute(connection) self.assertEqual(inner_wrapper.call_count, 1) self.call_executemany(connection) self.assertEqual(inner_wrapper.call_count, 2) def test_outer_wrapper_blocks(self): def blocker(*args): pass wrapper = self.mock_wrapper() c = connection # This alias shortens the next line. with c.execute_wrapper(wrapper), c.execute_wrapper(blocker), c.execute_wrapper(wrapper): with c.cursor() as cursor: cursor.execute("The database never sees this") self.assertEqual(wrapper.call_count, 1) cursor.executemany("The database never sees this %s", [("either",)]) self.assertEqual(wrapper.call_count, 2) def test_wrapper_gets_sql(self): wrapper = self.mock_wrapper() sql = "SELECT 'aloha'" + connection.features.bare_select_suffix with connection.execute_wrapper(wrapper), connection.cursor() as cursor: cursor.execute(sql) (_, reported_sql, _, _, _), _ = wrapper.call_args self.assertEqual(reported_sql, sql) def test_wrapper_connection_specific(self): wrapper = self.mock_wrapper() with connections['other'].execute_wrapper(wrapper): self.assertEqual(connections['other'].execute_wrappers, [wrapper]) self.call_execute(connection) self.assertFalse(wrapper.called) self.assertEqual(connection.execute_wrappers, []) self.assertEqual(connections['other'].execute_wrappers, []) class ConnectionHealthChecksTests(SimpleTestCase): databases = {'default'} def setUp(self): # All test cases here need newly configured and created connections. # Use the default db connection for convenience. connection.close() self.addCleanup(connection.close) def patch_settings_dict(self, conn_health_checks): self.settings_dict_patcher = patch.dict(connection.settings_dict, { **connection.settings_dict, 'CONN_MAX_AGE': None, 'CONN_HEALTH_CHECKS': conn_health_checks, }) self.settings_dict_patcher.start() self.addCleanup(self.settings_dict_patcher.stop) def run_query(self): with connection.cursor() as cursor: cursor.execute('SELECT 42' + connection.features.bare_select_suffix) @skipUnlessDBFeature('test_db_allows_multiple_connections') def test_health_checks_enabled(self): self.patch_settings_dict(conn_health_checks=True) self.assertIsNone(connection.connection) # Newly created connections are considered healthy without performing # the health check. with patch.object(connection, 'is_usable', side_effect=AssertionError): self.run_query() old_connection = connection.connection # Simulate request_finished. connection.close_if_unusable_or_obsolete() self.assertIs(old_connection, connection.connection) # Simulate connection health check failing. with patch.object(connection, 'is_usable', return_value=False) as mocked_is_usable: self.run_query() new_connection = connection.connection # A new connection is established. self.assertIsNot(new_connection, old_connection) # Only one health check per "request" is performed, so the next # query will carry on even if the health check fails. Next query # succeeds because the real connection is healthy and only the # health check failure is mocked. self.run_query() self.assertIs(new_connection, connection.connection) self.assertEqual(mocked_is_usable.call_count, 1) # Simulate request_finished. connection.close_if_unusable_or_obsolete() # The underlying connection is being reused further with health checks # succeeding. self.run_query() self.run_query() self.assertIs(new_connection, connection.connection) @skipUnlessDBFeature('test_db_allows_multiple_connections') def test_health_checks_enabled_errors_occurred(self): self.patch_settings_dict(conn_health_checks=True) self.assertIsNone(connection.connection) # Newly created connections are considered healthy without performing # the health check. with patch.object(connection, 'is_usable', side_effect=AssertionError): self.run_query() old_connection = connection.connection # Simulate errors_occurred. connection.errors_occurred = True # Simulate request_started (the connection is healthy). connection.close_if_unusable_or_obsolete() # Persistent connections are enabled. self.assertIs(old_connection, connection.connection) # No additional health checks after the one in # close_if_unusable_or_obsolete() are executed during this "request" # when running queries. with patch.object(connection, 'is_usable', side_effect=AssertionError): self.run_query() @skipUnlessDBFeature('test_db_allows_multiple_connections') def test_health_checks_disabled(self): self.patch_settings_dict(conn_health_checks=False) self.assertIsNone(connection.connection) # Newly created connections are considered healthy without performing # the health check. with patch.object(connection, 'is_usable', side_effect=AssertionError): self.run_query() old_connection = connection.connection # Simulate request_finished. connection.close_if_unusable_or_obsolete() # Persistent connections are enabled (connection is not). self.assertIs(old_connection, connection.connection) # Health checks are not performed. with patch.object(connection, 'is_usable', side_effect=AssertionError): self.run_query() # Health check wasn't performed and the connection is unchanged. self.assertIs(old_connection, connection.connection) self.run_query() # The connection is unchanged after the next query either during # the current "request". self.assertIs(old_connection, connection.connection) @skipUnlessDBFeature('test_db_allows_multiple_connections') def test_set_autocommit_health_checks_enabled(self): self.patch_settings_dict(conn_health_checks=True) self.assertIsNone(connection.connection) # Newly created connections are considered healthy without performing # the health check. with patch.object(connection, 'is_usable', side_effect=AssertionError): # Simulate outermost atomic block: changing autocommit for # a connection. connection.set_autocommit(False) self.run_query() connection.commit() connection.set_autocommit(True) old_connection = connection.connection # Simulate request_finished. connection.close_if_unusable_or_obsolete() # Persistent connections are enabled. self.assertIs(old_connection, connection.connection) # Simulate connection health check failing. with patch.object(connection, 'is_usable', return_value=False) as mocked_is_usable: # Simulate outermost atomic block: changing autocommit for # a connection. connection.set_autocommit(False) new_connection = connection.connection self.assertIsNot(new_connection, old_connection) # Only one health check per "request" is performed, so a query will # carry on even if the health check fails. This query succeeds # because the real connection is healthy and only the health check # failure is mocked. self.run_query() connection.commit() connection.set_autocommit(True) # The connection is unchanged. self.assertIs(new_connection, connection.connection) self.assertEqual(mocked_is_usable.call_count, 1) # Simulate request_finished. connection.close_if_unusable_or_obsolete() # The underlying connection is being reused further with health checks # succeeding. connection.set_autocommit(False) self.run_query() connection.commit() connection.set_autocommit(True) self.assertIs(new_connection, connection.connection)
Python
5
Lord-Elrond/django
tests/backends/base/test_base.py
[ "BSD-3-Clause", "0BSD" ]
//===--- ReferenceCounting.h ------------------------------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // //===----------------------------------------------------------------------===// #ifndef SWIFT_AST_REFERENCE_COUNTING_H #define SWIFT_AST_REFERENCE_COUNTING_H namespace swift { /// The kind of reference counting implementation a heap object uses. enum class ReferenceCounting : uint8_t { /// The object uses native Swift reference counting. Native, /// The object uses ObjC reference counting. /// /// When ObjC interop is enabled, native Swift class objects are also ObjC /// reference counting compatible. Swift non-class heap objects are never /// ObjC reference counting compatible. /// /// Blocks are always ObjC reference counting compatible. ObjC, /// The object has no reference counting. This is used by foreign reference /// types. None, /// The object uses _Block_copy/_Block_release reference counting. /// /// This is a strict subset of ObjC; all blocks are also ObjC reference /// counting compatible. The block is assumed to have already been moved to /// the heap so that _Block_copy returns the same object back. Block, /// The object has an unknown reference counting implementation. /// /// This uses maximally-compatible reference counting entry points in the /// runtime. Unknown, /// Cases prior to this one are binary-compatible with Unknown reference /// counting. LastUnknownCompatible = Unknown, /// The object has an unknown reference counting implementation and /// the reference value may contain extra bits that need to be masked. /// /// This uses maximally-compatible reference counting entry points in the /// runtime, with a masking layer on top. A bit inside the pointer is used /// to signal native Swift refcounting. Bridge, /// The object uses ErrorType's reference counting entry points. Error, }; } // end namespace swift #endif
C
5
xjc90s/swift
include/swift/AST/ReferenceCounting.h
[ "Apache-2.0" ]
//FILE: SetterTest.java import lombok.AccessLevel; import lombok.Setter; import lombok.Getter; @Getter @Setter public class SetterTest { private int age = 10; private final String finalName = "zzz"; private boolean primitiveBoolean; void test() { setAge(12); setPrimitiveBoolean(true); //no setters generated for final variable // setFinalName("adsf"); } } //FILE: test.kt class Test { fun run() { val obj = SetterTest() obj.setAge(42) assertEquals(obj.age, 42) obj.age = 43 assertEquals(obj.age, 43) obj.setPrimitiveBoolean(true) // no setters generated for final variable // obj.setFinalName("error") } }
Kotlin
4
Mu-L/kotlin
plugins/lombok/lombok-compiler-plugin/testData/compile/settersClassLevel.kt
[ "ECL-2.0", "Apache-2.0" ]
program Setup; { Inno Setup Copyright (C) 1997-2020 Jordan Russell Portions by Martijn Laan For conditions of distribution and use, see LICENSE.TXT. Setup program } {$SetPEFlags 1} {$SETPEOSVERSION 6.1} {$SETPESUBSYSVERSION 6.1} {$WEAKLINKRTTI ON} uses SafeDLLPath in 'SafeDLLPath.pas', XPTheme in 'XPTheme.pas', Forms, Windows, SysUtils, Messages, RichEditViewer, CmnFunc in 'CmnFunc.pas', CmnFunc2 in 'CmnFunc2.pas', Main in 'Main.pas' {MainForm}, Install in 'Install.pas', Msgs in 'Msgs.pas', MsgIDs in 'MsgIDs.pas', Undo in 'Undo.pas', Struct in 'Struct.pas', NewDisk in 'NewDisk.pas' {NewDiskForm}, InstFunc in 'InstFunc.pas', InstFnc2 in 'InstFnc2.pas', Wizard in 'Wizard.pas' {WizardForm}, ScriptFunc_R in 'ScriptFunc_R.pas', ScriptFunc in 'ScriptFunc.pas', SetupTypes in 'SetupTypes.pas', ScriptRunner in 'ScriptRunner.pas', ScriptDlg in 'ScriptDlg.pas', ScriptClasses_R in 'ScriptClasses_R.pas', SelLangForm in 'SelLangForm.pas' {SelectLanguageForm}, Extract in 'Extract.pas', Int64Em in 'Int64Em.pas', SelFolderForm in 'SelFolderForm.pas' {SelectFolderForm}, Compress in 'Compress.pas', CompressZlib in 'CompressZlib.pas', bzlib in 'bzlib.pas', LZMADecomp in 'LZMADecomp.pas', FileClass in 'FileClass.pas', MD5 in 'MD5.pas', SHA1 in 'SHA1.pas', Logging in 'Logging.pas', DebugClient in 'DebugClient.pas', DebugStruct in 'DebugStruct.pas', ArcFour in 'ArcFour.pas', Uninstall in 'Uninstall.pas', UninstProgressForm in 'UninstProgressForm.pas' {UninstProgressForm}, UninstSharedFileForm in 'UninstSharedFileForm.pas' {UninstSharedFileForm}, SimpleExpression in 'SimpleExpression.pas', UIStateForm in 'UIStateForm.pas', SetupForm in 'SetupForm.pas', RegSvr in 'RegSvr.pas', BrowseFunc in 'BrowseFunc.pas', RedirFunc in 'RedirFunc.pas', SecurityFunc in 'SecurityFunc.pas', Helper in 'Helper.pas', VerInfo in 'VerInfo.pas', RegDLL in 'RegDLL.pas', ResUpdate in 'ResUpdate.pas', SpawnCommon in 'SpawnCommon.pas', SpawnServer in 'SpawnServer.pas', SpawnClient in 'SpawnClient.pas', TaskDialog in 'TaskDialog.pas'; {$R *.RES} {$IFDEF UNICODE} {$R SetupVersionUnicode.res} {$ELSE} {$R SetupVersion.res} {$ENDIF} {$R IMAGES.RES} {$I VERSION.INC} procedure ShowExceptionMsg; var S: String; begin if ExceptObject is EAbort then begin Log('Got EAbort exception.'); Exit; end; S := GetExceptMessage; Log('Exception message:'); LoggedAppMessageBox(PChar(S), Pointer(SetupMessages[msgErrorTitle]), MB_OK or MB_ICONSTOP, True, IDOK); { ^ use a Pointer cast instead of a PChar cast so that it will use "nil" if SetupMessages[msgErrorTitle] is empty due to the messages not being loaded yet. MessageBox displays 'Error' as the caption if the lpCaption parameter is nil. } end; type TDummyClass = class private class function AntiShutdownHook(var Message: TMessage): Boolean; end; class function TDummyClass.AntiShutdownHook(var Message: TMessage): Boolean; begin { This causes Setup/Uninstall/RegSvr to all deny shutdown attempts. - If we were to return 1, Windows will send us a WM_ENDSESSION message and TApplication.WndProc will call Halt in response. This is no good because it would cause an unclean shutdown of Setup, and it would also prevent the right exit code from being returned. Even if TApplication.WndProc didn't call Halt, it is my understanding that Windows could kill us off after sending us the WM_ENDSESSION message (see the Remarks section of the WM_ENDSESSION docs). - SetupLdr denys shutdown attempts as well, so there is little point in Setup trying to handle them. (Depending on the version of Windows, we may never even get a WM_QUERYENDSESSION message because of that.) Note: TSetupForm also has a WM_QUERYENDSESSION handler of its own to prevent CloseQuery from being called. } Result := False; case Message.Msg of WM_QUERYENDSESSION: begin { Return zero, except if RestartInitiatedByThisProcess is set (which means we called RestartComputer previously) } if RestartInitiatedByThisProcess or (IsUninstaller and AllowUninstallerShutdown) then begin AcceptedQueryEndSessionInProgress := True; Message.Result := 1 end else Message.Result := 0; Result := True; end; WM_ENDSESSION: begin { Should only get here if RestartInitiatedByThisProcess is set or an Uninstaller shutdown was allowed, or if the user forced a shutdown on Vista or newer. Skip the default handling which calls Halt. No code of ours depends on the Halt call to clean up, and it could theoretically result in obscure reentrancy bugs. Example: I've found that combo boxes pump incoming sent messages when they are destroyed*; if one of those messages were a WM_ENDSESSION, the Halt call could cause another destructor to be to be entered (DoneApplication frees all still-existing forms) before the combo box's destructor has returned. * arguably a Windows bug. The internal ComboLBox window is created as a child (WS_CHILD) of GetDesktopWindow(); when it is destroyed, a WM_PARENTNOTIFY(WM_DESTROY) message is sent to the desktop window. Because the desktop window is on a separate thread, pending sent messages are dispatched during the SendMessage call. } if Bool(Message.wParam) = True then begin if not RestartInitiatedByThisProcess and IsUninstaller then HandleUninstallerEndSession; end else AcceptedQueryEndSessionInProgress := False; Result := True; end; {$IFDEF IS_D12} WM_STYLECHANGING: begin { On Delphi 2009, we must suppress some of the VCL's manipulation of the application window styles in order to prevent the taskbar button from re-appearing after SetTaskbarButtonVisibility(False) was used to hide it. - The VCL tries to clear WS_EX_TOOLWINDOW whenever a form handle is created (see TCustomForm.CreateParams). Since SetTaskbarButtonVisibility uses the WS_EX_TOOLWINDOW style internally to hide the taskbar button, we can't allow that. - The VCL tries to set WS_EX_APPWINDOW on the application window after the main form is created (see ChangeAppWindow in Forms). The WS_EX_APPWINDOW style forces the window to show a taskbar button, overriding WS_EX_TOOLWINDOW, so don't allow that either. (It appears to be redundant anyway.) } if Integer(Message.WParam) = GWL_EXSTYLE then begin { SetTaskbarButtonVisibility sets TaskbarButtonHidden } if TaskbarButtonHidden then PStyleStruct(Message.LParam).styleNew := PStyleStruct(Message.LParam).styleNew or WS_EX_TOOLWINDOW; PStyleStruct(Message.LParam).styleNew := PStyleStruct(Message.LParam).styleNew and not WS_EX_APPWINDOW; end; end; {$ENDIF} end; end; procedure DisableWindowGhosting; var Proc: procedure; stdcall; begin { Note: The documentation claims this function is only available in XP SP1, but it's actually available on stock XP too. } Proc := GetProcAddress(GetModuleHandle(user32), 'DisableProcessWindowsGhosting'); if Assigned(Proc) then Proc; end; procedure SelectMode; { Determines whether we should run as Setup, Uninstall, or RegSvr } var ParamName, ParamValue: String; Mode: (smSetup, smUninstaller, smRegSvr); F: TFile; ID: Longint; I: Integer; begin { When SignedUninstaller=yes, the EXE header specifies uninstaller mode by default. Use Setup mode instead if we're being called from SetupLdr. } SplitNewParamStr(1, ParamName, ParamValue); if CompareText(ParamName, '/SL5=') = 0 then Exit; Mode := smSetup; for I := 1 to NewParamCount do begin if CompareText(NewParamStr(I), '/UNINSTMODE') = 0 then begin Mode := smUninstaller; Break; end; if CompareText(NewParamStr(I), '/REGSVRMODE') = 0 then begin Mode := smRegSvr; Break; end; end; if Mode = smSetup then begin { No mode specified on the command line; check the EXE header for one } F := TFile.Create(NewParamStr(0), fdOpenExisting, faRead, fsRead); try F.Seek(SetupExeModeOffset); F.ReadBuffer(ID, SizeOf(ID)); finally F.Free; end; case ID of SetupExeModeUninstaller: Mode := smUninstaller; SetupExeModeRegSvr: Mode := smRegSvr; end; end; case Mode of smUninstaller: begin IsUninstaller := True; AllowUninstallerShutdown := False; RunUninstaller; { Shouldn't get here; RunUninstaller should Halt itself } Halt(1); end; smRegSvr: begin try RunRegSvr; except ShowExceptionMsg; end; Halt; end; end; end; begin {$IFDEF IS_D12} { Delphi 2009 initially sets WS_EX_TOOLWINDOW on the application window. That will prevent our ShowWindow(Application.Handle, SW_SHOW) calls from actually displaying the taskbar button as intended, so clear it. } SetWindowLong(Application.Handle, GWL_EXSTYLE, GetWindowLong(Application.Handle, GWL_EXSTYLE) and not WS_EX_TOOLWINDOW); {$ENDIF} try SetErrorMode(SEM_FAILCRITICALERRORS); DisableWindowGhosting; Application.HookMainWindow(TDummyClass.AntiShutdownHook); TRichEditViewer.CustomShellExecute := ShellExecuteAsOriginalUser; SelectMode; { Only returns if we should run as Setup } except { Halt on any exception } ShowExceptionMsg; Halt(ecInitializationError); end; { Initialize. Note: There's no need to localize the following line since it's changed in InitializeSetup } Application.Title := 'Setup'; { On Delphi 3+, the application window by default isn't visible until a form is shown. Force it visible like Delphi 2. Note that due to the way TApplication.UpdateVisible is coded, this should be permanent; if a form is shown and hidden, the application window should still be visible. } ShowWindow(Application.Handle, SW_SHOW); Application.OnException := TMainForm.ShowException; try Application.Initialize; InitializeSetup; Application.CreateForm(TMainForm, MainForm); MainForm.InitializeWizard; except { Halt on any exception } ShowExceptionMsg; try DeinitSetup(False); except { don't propagate any exceptions, so that Halt is always called } ShowExceptionMsg; end; if SetupExitCode <> 0 then Halt(SetupExitCode) else Halt(ecInitializationError); end; { Run } try Application.Run; except { Show any exception and continue } ShowExceptionMsg; end; { Deinitialize (clean up) } try DeinitSetup(SetupExitCode = 0); except { Show any exception and continue } ShowExceptionMsg; end; Halt(SetupExitCode); end.
Pascal
4
mqt635/issrc
Projects/Setup.dpr
[ "FSFAP" ]
using Ryujinx.Memory.Range; using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; namespace Ryujinx.Memory.WindowsShared { class EmulatedSharedMemoryWindows : IDisposable { private static readonly IntPtr InvalidHandleValue = new IntPtr(-1); private static readonly IntPtr CurrentProcessHandle = new IntPtr(-1); public const int MappingBits = 16; // Windows 64kb granularity. public const ulong MappingGranularity = 1 << MappingBits; public const ulong MappingMask = MappingGranularity - 1; public const ulong BackingSize32GB = 32UL * 1024UL * 1024UL * 1024UL; // Reasonable max size of 32GB. private class SharedMemoryMapping : INonOverlappingRange { public ulong Address { get; } public ulong Size { get; private set; } public ulong EndAddress { get; private set; } public List<int> Blocks; public SharedMemoryMapping(ulong address, ulong size, List<int> blocks = null) { Address = address; Size = size; EndAddress = address + size; Blocks = blocks ?? new List<int>(); } public bool OverlapsWith(ulong address, ulong size) { return Address < address + size && address < EndAddress; } public void ExtendTo(ulong endAddress, RangeList<SharedMemoryMapping> list) { EndAddress = endAddress; Size = endAddress - Address; list.UpdateEndAddress(this); } public void AddBlocks(IEnumerable<int> blocks) { if (Blocks.Count > 0 && blocks.Count() > 0 && Blocks.Last() == blocks.First()) { Blocks.AddRange(blocks.Skip(1)); } else { Blocks.AddRange(blocks); } } public INonOverlappingRange Split(ulong splitAddress) { SharedMemoryMapping newRegion = new SharedMemoryMapping(splitAddress, EndAddress - splitAddress); int end = (int)((EndAddress + MappingMask) >> MappingBits); int start = (int)(Address >> MappingBits); Size = splitAddress - Address; EndAddress = splitAddress; int splitEndBlock = (int)((splitAddress + MappingMask) >> MappingBits); int splitStartBlock = (int)(splitAddress >> MappingBits); newRegion.AddBlocks(Blocks.Skip(splitStartBlock - start)); Blocks.RemoveRange(splitEndBlock - start, end - splitEndBlock); return newRegion; } } [DllImport("kernel32.dll", SetLastError = true)] private static extern IntPtr CreateFileMapping( IntPtr hFile, IntPtr lpFileMappingAttributes, FileMapProtection flProtect, uint dwMaximumSizeHigh, uint dwMaximumSizeLow, [MarshalAs(UnmanagedType.LPWStr)] string lpName); [DllImport("kernel32.dll", SetLastError = true)] private static extern bool CloseHandle(IntPtr hObject); [DllImport("KernelBase.dll", SetLastError = true)] private static extern IntPtr VirtualAlloc2( IntPtr process, IntPtr lpAddress, IntPtr dwSize, AllocationType flAllocationType, MemoryProtection flProtect, IntPtr extendedParameters, ulong parameterCount); [DllImport("kernel32.dll", SetLastError = true)] private static extern bool VirtualFree(IntPtr lpAddress, IntPtr dwSize, AllocationType dwFreeType); [DllImport("KernelBase.dll", SetLastError = true)] private static extern IntPtr MapViewOfFile3( IntPtr hFileMappingObject, IntPtr process, IntPtr baseAddress, ulong offset, IntPtr dwNumberOfBytesToMap, ulong allocationType, MemoryProtection dwDesiredAccess, IntPtr extendedParameters, ulong parameterCount); [DllImport("KernelBase.dll", SetLastError = true)] private static extern bool UnmapViewOfFile2(IntPtr process, IntPtr lpBaseAddress, ulong unmapFlags); private ulong _size; private object _lock = new object(); private ulong _backingSize; private IntPtr _backingMemHandle; private int _backingEnd; private int _backingAllocated; private Queue<int> _backingFreeList; private List<ulong> _mappedBases; private RangeList<SharedMemoryMapping> _mappings; private SharedMemoryMapping[] _foundMappings = new SharedMemoryMapping[32]; private PlaceholderList _placeholders; public EmulatedSharedMemoryWindows(ulong size) { ulong backingSize = BackingSize32GB; _size = size; _backingSize = backingSize; _backingMemHandle = CreateFileMapping( InvalidHandleValue, IntPtr.Zero, FileMapProtection.PageReadWrite | FileMapProtection.SectionReserve, (uint)(backingSize >> 32), (uint)backingSize, null); if (_backingMemHandle == IntPtr.Zero) { throw new OutOfMemoryException(); } _backingFreeList = new Queue<int>(); _mappings = new RangeList<SharedMemoryMapping>(); _mappedBases = new List<ulong>(); _placeholders = new PlaceholderList(size >> MappingBits); } private (ulong granularStart, ulong granularEnd) GetAlignedRange(ulong address, ulong size) { return (address & (~MappingMask), (address + size + MappingMask) & (~MappingMask)); } private void Commit(ulong address, ulong size) { (ulong granularStart, ulong granularEnd) = GetAlignedRange(address, size); ulong endAddress = address + size; lock (_lock) { // Search a bit before and after the new mapping. // When adding our new mapping, we may need to join an existing mapping into our new mapping (or in some cases, to the other side!) ulong searchStart = granularStart == 0 ? 0 : (granularStart - 1); int mappingCount = _mappings.FindOverlapsNonOverlapping(searchStart, (granularEnd - searchStart) + 1, ref _foundMappings); int first = -1; int last = -1; SharedMemoryMapping startOverlap = null; SharedMemoryMapping endOverlap = null; int lastIndex = (int)(address >> MappingBits); int endIndex = (int)((endAddress + MappingMask) >> MappingBits); int firstBlock = -1; int endBlock = -1; for (int i = 0; i < mappingCount; i++) { SharedMemoryMapping mapping = _foundMappings[i]; if (mapping.Address < address) { if (mapping.EndAddress >= address) { startOverlap = mapping; } if ((int)((mapping.EndAddress - 1) >> MappingBits) == lastIndex) { lastIndex = (int)((mapping.EndAddress + MappingMask) >> MappingBits); firstBlock = mapping.Blocks.Last(); } } if (mapping.EndAddress > endAddress) { if (mapping.Address <= endAddress) { endOverlap = mapping; } if ((int)((mapping.Address) >> MappingBits) + 1 == endIndex) { endIndex = (int)((mapping.Address) >> MappingBits); endBlock = mapping.Blocks.First(); } } if (mapping.OverlapsWith(address, size)) { if (first == -1) { first = i; } last = i; } } if (startOverlap == endOverlap && startOverlap != null) { // Already fully committed. return; } var blocks = new List<int>(); int lastBlock = -1; if (firstBlock != -1) { blocks.Add(firstBlock); lastBlock = firstBlock; } bool hasMapped = false; Action map = () => { if (!hasMapped) { _placeholders.EnsurePlaceholders(address >> MappingBits, (granularEnd - granularStart) >> MappingBits, SplitPlaceholder); hasMapped = true; } // There's a gap between this index and the last. Allocate blocks to fill it. blocks.Add(MapBackingBlock(MappingGranularity * (ulong)lastIndex++)); }; if (first != -1) { for (int i = first; i <= last; i++) { SharedMemoryMapping mapping = _foundMappings[i]; int mapIndex = (int)(mapping.Address >> MappingBits); while (lastIndex < mapIndex) { map(); } if (lastBlock == mapping.Blocks[0]) { blocks.AddRange(mapping.Blocks.Skip(1)); } else { blocks.AddRange(mapping.Blocks); } lastIndex = (int)((mapping.EndAddress - 1) >> MappingBits) + 1; } } while (lastIndex < endIndex) { map(); } if (endBlock != -1 && endBlock != lastBlock) { blocks.Add(endBlock); } if (startOverlap != null && endOverlap != null) { // Both sides should be coalesced. Extend the start overlap to contain the end overlap, and add together their blocks. _mappings.Remove(endOverlap); startOverlap.ExtendTo(endOverlap.EndAddress, _mappings); startOverlap.AddBlocks(blocks); startOverlap.AddBlocks(endOverlap.Blocks); } else if (startOverlap != null) { startOverlap.ExtendTo(endAddress, _mappings); startOverlap.AddBlocks(blocks); } else { var mapping = new SharedMemoryMapping(address, size, blocks); if (endOverlap != null) { mapping.ExtendTo(endOverlap.EndAddress, _mappings); mapping.AddBlocks(endOverlap.Blocks); _mappings.Remove(endOverlap); } _mappings.Add(mapping); } } } private void Decommit(ulong address, ulong size) { (ulong granularStart, ulong granularEnd) = GetAlignedRange(address, size); ulong endAddress = address + size; lock (_lock) { int mappingCount = _mappings.FindOverlapsNonOverlapping(granularStart, granularEnd - granularStart, ref _foundMappings); int first = -1; int last = -1; for (int i = 0; i < mappingCount; i++) { SharedMemoryMapping mapping = _foundMappings[i]; if (mapping.OverlapsWith(address, size)) { if (first == -1) { first = i; } last = i; } } if (first == -1) { return; // Could not find any regions to decommit. } int lastReleasedBlock = -1; bool releasedFirst = false; bool releasedLast = false; for (int i = last; i >= first; i--) { SharedMemoryMapping mapping = _foundMappings[i]; bool releaseEnd = true; bool releaseStart = true; if (i == last) { // If this is the last region, do not release the block if there is a page ahead of us, or the block continues after us. (it is keeping the block alive) releaseEnd = last == mappingCount - 1; // If the end region starts after the decommit end address, split and readd it after modifying its base address. if (mapping.EndAddress > endAddress) { var newMapping = (SharedMemoryMapping)mapping.Split(endAddress); _mappings.UpdateEndAddress(mapping); _mappings.Add(newMapping); if ((endAddress & MappingMask) != 0) { releaseEnd = false; } } releasedLast = releaseEnd; } if (i == first) { // If this is the first region, do not release the block if there is a region behind us. (it is keeping the block alive) releaseStart = first == 0; // If the first region starts before the decommit address, split it by modifying its end address. if (mapping.Address < address) { var oldMapping = mapping; mapping = (SharedMemoryMapping)mapping.Split(address); _mappings.UpdateEndAddress(oldMapping); if ((address & MappingMask) != 0) { releaseStart = false; } } releasedFirst = releaseStart; } _mappings.Remove(mapping); ulong releasePointer = (mapping.EndAddress + MappingMask) & (~MappingMask); for (int j = mapping.Blocks.Count - 1; j >= 0; j--) { int blockId = mapping.Blocks[j]; releasePointer -= MappingGranularity; if (lastReleasedBlock == blockId) { // When committed regions are fragmented, multiple will have the same block id for their start/end granular block. // Avoid releasing these blocks twice. continue; } if ((j != 0 || releaseStart) && (j != mapping.Blocks.Count - 1 || releaseEnd)) { ReleaseBackingBlock(releasePointer, blockId); } lastReleasedBlock = blockId; } } ulong placeholderStart = (granularStart >> MappingBits) + (releasedFirst ? 0UL : 1UL); ulong placeholderEnd = (granularEnd >> MappingBits) - (releasedLast ? 0UL : 1UL); if (placeholderEnd > placeholderStart) { _placeholders.RemovePlaceholders(placeholderStart, placeholderEnd - placeholderStart, CoalescePlaceholder); } } } public bool CommitMap(IntPtr address, IntPtr size) { lock (_lock) { foreach (ulong mapping in _mappedBases) { ulong offset = (ulong)address - mapping; if (offset < _size) { Commit(offset, (ulong)size); return true; } } } return false; } public bool DecommitMap(IntPtr address, IntPtr size) { lock (_lock) { foreach (ulong mapping in _mappedBases) { ulong offset = (ulong)address - mapping; if (offset < _size) { Decommit(offset, (ulong)size); return true; } } } return false; } private int MapBackingBlock(ulong offset) { bool allocate = false; int backing; if (_backingFreeList.Count > 0) { backing = _backingFreeList.Dequeue(); } else { if (_backingAllocated == _backingEnd) { // Allocate the backing. _backingAllocated++; allocate = true; } backing = _backingEnd++; } ulong backingOffset = MappingGranularity * (ulong)backing; foreach (ulong baseAddress in _mappedBases) { CommitToMap(baseAddress, offset, MappingGranularity, backingOffset, allocate); allocate = false; } return backing; } private void ReleaseBackingBlock(ulong offset, int id) { foreach (ulong baseAddress in _mappedBases) { DecommitFromMap(baseAddress, offset); } if (_backingEnd - 1 == id) { _backingEnd = id; } else { _backingFreeList.Enqueue(id); } } public IntPtr Map() { IntPtr newMapping = VirtualAlloc2( CurrentProcessHandle, IntPtr.Zero, (IntPtr)_size, AllocationType.Reserve | AllocationType.ReservePlaceholder, MemoryProtection.NoAccess, IntPtr.Zero, 0); if (newMapping == IntPtr.Zero) { throw new OutOfMemoryException(); } // Apply all existing mappings to the new mapping lock (_lock) { int lastBlock = -1; foreach (SharedMemoryMapping mapping in _mappings) { ulong blockAddress = mapping.Address & (~MappingMask); foreach (int block in mapping.Blocks) { if (block != lastBlock) { ulong backingOffset = MappingGranularity * (ulong)block; CommitToMap((ulong)newMapping, blockAddress, MappingGranularity, backingOffset, false); lastBlock = block; } blockAddress += MappingGranularity; } } _mappedBases.Add((ulong)newMapping); } return newMapping; } private void SplitPlaceholder(ulong address, ulong size) { ulong byteAddress = address << MappingBits; IntPtr byteSize = (IntPtr)(size << MappingBits); foreach (ulong mapAddress in _mappedBases) { bool result = VirtualFree((IntPtr)(mapAddress + byteAddress), byteSize, AllocationType.PreservePlaceholder | AllocationType.Release); if (!result) { throw new InvalidOperationException("Placeholder could not be split."); } } } private void CoalescePlaceholder(ulong address, ulong size) { ulong byteAddress = address << MappingBits; IntPtr byteSize = (IntPtr)(size << MappingBits); foreach (ulong mapAddress in _mappedBases) { bool result = VirtualFree((IntPtr)(mapAddress + byteAddress), byteSize, AllocationType.CoalescePlaceholders | AllocationType.Release); if (!result) { throw new InvalidOperationException("Placeholder could not be coalesced."); } } } private void CommitToMap(ulong mapAddress, ulong address, ulong size, ulong backingOffset, bool allocate) { IntPtr targetAddress = (IntPtr)(mapAddress + address); // Assume the placeholder worked (or already exists) // Map the backing memory into the mapped location. IntPtr mapped = MapViewOfFile3( _backingMemHandle, CurrentProcessHandle, targetAddress, backingOffset, (IntPtr)MappingGranularity, 0x4000, // REPLACE_PLACEHOLDER MemoryProtection.ReadWrite, IntPtr.Zero, 0); if (mapped == IntPtr.Zero) { throw new InvalidOperationException($"Could not map view of backing memory. (va=0x{address:X16} size=0x{size:X16}, error code {Marshal.GetLastWin32Error()})"); } if (allocate) { // Commit this part of the shared memory. VirtualAlloc2(CurrentProcessHandle, targetAddress, (IntPtr)MappingGranularity, AllocationType.Commit, MemoryProtection.ReadWrite, IntPtr.Zero, 0); } } private void DecommitFromMap(ulong baseAddress, ulong address) { UnmapViewOfFile2(CurrentProcessHandle, (IntPtr)(baseAddress + address), 2); } public bool Unmap(ulong baseAddress) { lock (_lock) { if (_mappedBases.Remove(baseAddress)) { int lastBlock = -1; foreach (SharedMemoryMapping mapping in _mappings) { ulong blockAddress = mapping.Address & (~MappingMask); foreach (int block in mapping.Blocks) { if (block != lastBlock) { DecommitFromMap(baseAddress, blockAddress); lastBlock = block; } blockAddress += MappingGranularity; } } if (!VirtualFree((IntPtr)baseAddress, (IntPtr)0, AllocationType.Release)) { throw new InvalidOperationException("Couldn't free mapping placeholder."); } return true; } return false; } } public void Dispose() { // Remove all file mappings lock (_lock) { foreach (ulong baseAddress in _mappedBases.ToArray()) { Unmap(baseAddress); } } // Finally, delete the file mapping. CloseHandle(_backingMemHandle); } } }
C#
5
BrandonAraya/Ryujinx
Ryujinx.Memory/WindowsShared/EmulatedSharedMemoryWindows.cs
[ "MIT" ]
; CLW file contains information for the MFC ClassWizard [General Info] Version=1 ClassCount=1 ResourceCount=1 NewFileInclude1=#include "stdafx.h" Class1=CPortView LastClass=CPortView LastTemplate=CFormView Resource1=IDD_NODEVIEW [DLG:IDD_NODEVIEW] Type=1 Class=CPortView ControlCount=12 Control1=IDC_STATIC,static,1342308352 Control2=IDC_EDIT1,edit,1350631552 Control3=IDC_STATIC,static,1342308352 Control4=IDC_COMBO1,combobox,1344339971 Control5=IDC_STATIC,static,1342308352 Control6=IDC_STATIC,static,1342308352 Control7=IDC_EDIT2,edit,1350631552 Control8=IDC_EDIT3,edit,1350631552 Control9=IDC_STATIC,static,1342308352 Control10=IDC_STATIC,static,1342308352 Control11=IDC_COMBO2,combobox,1344339971 Control12=IDC_COMBO3,combobox,1344339971 [CLS:CPortView] Type=0 HeaderFile=PortView.h ImplementationFile=PortView.cpp BaseClass=CFormView Filter=D LastObject=IDC_EDIT3 VirtualFilter=VWC
Clarion
2
CarysT/medusa
Tools/NodeBooleanPort/NodeBooleanPort.clw
[ "MIT" ]
/* * References: * @parchedmind * https://github.com/CylanceVulnResearch/osx_runbin/blob/master/run_bin.c * * @nologic * https://github.com/nologic/shellcc */ #include <stdio.h> #include <string.h> #include <mach-o/loader.h> #include <mach-o/nlist.h> #include <mach-o/dyld.h> #include <sys/types.h> #include <sys/sysctl.h> typedef NSObjectFileImageReturnCode (*NSCreateObjectFileImageFromMemory_ptr)(void *address, unsigned long size, NSObjectFileImage *objectFileImage); typedef NSModule (*NSLinkModule_ptr)(NSObjectFileImage objectFileImage, const char* moduleName, unsigned long options); typedef NSSymbol (*NSLookupSymbolInModule_ptr)(NSModule module, const char *symbolName); typedef void * (*NSAddressOfSymbol_ptr)(NSSymbol symbol); uint64_t find_macho(uint64_t addr, unsigned int increment); uint64_t find_symbol(uint64_t base, char* symbol); int string_compare(const char* s1, const char* s2); int detect_sierra(); /*#define DEBUG*/ #ifdef DEBUG static void print(char * str); #endif #define DYLD_BASE_ADDR 0x00007fff5fc00000 #define MAX_OSXVM_ADDR 0x00007ffffffff000 int main(int argc, char** argv) { #ifdef DEBUG print("main!\n"); #endif uint64_t buffer = 0; uint64_t buffer_size = 0; __asm__( "movq %%r10, %0;\n" "movq %%r12, %1;\n" : "=g"(buffer), "=g"(buffer_size)); #ifdef DEBUG print("hello world!\n"); #endif int sierra = detect_sierra(); uint64_t binary = DYLD_BASE_ADDR; if (sierra) { binary = find_macho(0x100000000, 0x1000); if (!binary) { return 1; } binary += 0x1000; } uint64_t dyld = find_macho(binary, 0x1000); if (!dyld) { return 1; } NSCreateObjectFileImageFromMemory_ptr NSCreateObjectFileImageFromMemory_func = (void*)find_symbol(dyld, "_NSCreateObjectFileImageFromMemory"); while (!NSCreateObjectFileImageFromMemory_func) { dyld = find_macho(dyld + 0x1000, 0x1000); if (!dyld) { return 1; } NSCreateObjectFileImageFromMemory_func = (void*)find_symbol(dyld, "_NSCreateObjectFileImageFromMemory"); } #ifdef DEBUG print("good symbol!\n"); #endif NSLinkModule_ptr NSLinkModule_func = (void*)find_symbol(dyld, "_NSLinkModule"); if (!NSLinkModule_func) { return 1; } NSLookupSymbolInModule_ptr NSLookupSymbolInModule_func = (void*)find_symbol(dyld, "_NSLookupSymbolInModule"); if (!NSLookupSymbolInModule_func) { return 1; } NSAddressOfSymbol_ptr NSAddressOfSymbol_func = (void*)find_symbol(dyld, "_NSAddressOfSymbol"); if (!NSAddressOfSymbol_func) { return 1; } if (!sierra) { NSCreateObjectFileImageFromMemory_func -= DYLD_BASE_ADDR; NSLinkModule_func -= DYLD_BASE_ADDR; NSLookupSymbolInModule_func -= DYLD_BASE_ADDR; NSAddressOfSymbol_func -= DYLD_BASE_ADDR; } /*if (*(char*)buffer == 'b') {*/ /*print("magic b!\n");*/ /*}*/ *(char*)buffer = '\xcf'; ((uint32_t *)buffer)[3] = MH_BUNDLE; NSObjectFileImage fi = 0; if (NSCreateObjectFileImageFromMemory_func((void*)buffer, buffer_size, &fi) != 1) { return 1; } #ifdef DEBUG print("created!\n"); #endif NSModule nm = NSLinkModule_func(fi, "", NSLINKMODULE_OPTION_PRIVATE | NSLINKMODULE_OPTION_BINDNOW | NSLINKMODULE_OPTION_RETURN_ON_ERROR); if (!nm) { #ifdef DEBUG print("no nm!\n"); #endif return 1; } #ifdef DEBUG print("good nm!\n"); #endif NSSymbol sym_main = NSLookupSymbolInModule_func(nm, "_main"); if (!sym_main) { return 1; } void * addr_main = NSAddressOfSymbol_func(sym_main); if (!addr_main) { return 1; } #ifdef DEBUG print("found main!\n"); #endif int(*main_func)(int, char**) = (int(*)(int, char**))addr_main; char* socket = (char*)(size_t)argc; char *new_argv[] = { "m", socket, NULL }; int new_argc = 2; return main_func(new_argc, new_argv); } uint64_t find_symbol(uint64_t base, char* symbol) { struct segment_command_64 *sc, *linkedit, *text; struct load_command *lc; struct symtab_command *symtab; struct nlist_64 *nl; char *strtab; symtab = 0; linkedit = 0; text = 0; lc = (struct load_command *)(base + sizeof(struct mach_header_64)); for (int i=0; i<((struct mach_header_64 *)base)->ncmds; i++) { if (lc->cmd == LC_SYMTAB) { symtab = (struct symtab_command *)lc; } else if (lc->cmd == LC_SEGMENT_64) { sc = (struct segment_command_64 *)lc; char * segname = ((struct segment_command_64 *)lc)->segname; if (string_compare(segname, "__LINKEDIT") == 0) { linkedit = sc; } else if (string_compare(segname, "__TEXT") == 0) { text = sc; } } lc = (struct load_command *)((unsigned long)lc + lc->cmdsize); } if (!linkedit || !symtab || !text) { return 0; } unsigned long file_slide = linkedit->vmaddr - text->vmaddr - linkedit->fileoff; strtab = (char *)(base + file_slide + symtab->stroff); nl = (struct nlist_64 *)(base + file_slide + symtab->symoff); for (int i=0; i<symtab->nsyms; i++) { char *name = strtab + nl[i].n_un.n_strx; /*#ifdef DEBUG*/ /*print(name);*/ /*print("\n");*/ /*#endif*/ if (string_compare(name, symbol) == 0) { return base + nl[i].n_value; } } return 0; } uint64_t syscall_chmod(uint64_t path, long mode) { uint64_t chmod_no = 0x200000f; uint64_t ret = 0; __asm__( "movq %1, %%rax;\n" "movq %2, %%rdi;\n" "movq %3, %%rsi;\n" "syscall;\n" "movq %%rax, %0;\n" : "=g"(ret) : "g"(chmod_no), "S"(path), "g"(mode) :); return ret; } uint64_t find_macho(uint64_t addr, unsigned int increment) { while(addr < MAX_OSXVM_ADDR) { uint64_t ptr = addr; unsigned long ret = syscall_chmod(ptr, 0777); if (ret == 0x2 && ((int *)ptr)[0] == MH_MAGIC_64) { return ptr; } addr += increment; } return 0; } int string_compare(const char* s1, const char* s2) { while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } return (*(unsigned char *) s1) - (*(unsigned char *) s2); } int detect_sierra() { uint64_t sc_sysctl = 0x20000ca; int name[] = { CTL_KERN, KERN_OSRELEASE }; uint64_t nameptr = (uint64_t)&name; uint64_t namelen = sizeof(name)/sizeof(name[0]); char osrelease[32]; size_t size = sizeof(osrelease); uint64_t valptr = (uint64_t)osrelease; uint64_t valsizeptr = (uint64_t)&size; uint64_t ret = 0; __asm__( "mov %1, %%rax;\n" "mov %2, %%rdi;\n" "mov %3, %%rsi;\n" "mov %4, %%rdx;\n" "mov %5, %%r10;\n" "xor %%r8, %%r8;\n" "xor %%r9, %%r9;\n" "syscall;\n" "mov %%rax, %0;\n" : "=g"(ret) : "g"(sc_sysctl), "g"(nameptr), "g"(namelen), "g"(valptr), "g"(valsizeptr) : ); // osrelease is 16.x.x on Sierra if (ret == 0 && size > 2) { if (osrelease[0] == '1' && osrelease[1] < '6') { return 0; } if (osrelease[0] <= '9' && osrelease[1] == '.') { return 0; } } return 1; } #ifdef DEBUG int string_len(const char* s1) { const char* s2 = s1; while (*s2 != '\0') { s2++; } return (s2 - s1); } void print(char * str) { long write = 0x2000004; long stdout = 1; unsigned long len = string_len(str); unsigned long long addr = (unsigned long long) str; unsigned long ret = 0; /* ret = write(stdout, str, len); */ __asm__( "movq %1, %%rax;\n" "movq %2, %%rdi;\n" "movq %3, %%rsi;\n" "movq %4, %%rdx;\n" "syscall;\n" "movq %%rax, %0;\n" : "=g"(ret) : "g"(write), "g"(stdout), "S"(addr), "g"(len) : "rax", "rdi", "rdx" ); } #endif
C
4
OsmanDere/metasploit-framework
external/source/shellcode/osx/stager/main.c
[ "BSD-2-Clause", "BSD-3-Clause" ]
using Uno; using Uno.Collections; using Uno.UX; namespace Fuse { public enum Orientation { Horizontal, Vertical } }
Uno
3
mortend/fuse-studio
Source/CodeCompletion/Outracks.CodeCompletion.UXNinja.TestsCommon/TestData/Orientation.uno
[ "MIT" ]
{ "cells": [ { "cell_type": "markdown", "id": "62e2337c", "metadata": {}, "source": [ "#### Data Owner uploads the dataset on the domain\n", "\n", "- The user log into the domian\n", "- The user loads the dataset to be uploaded into memory\n", "- The user converts the data to tensors\n", "- The user converts the tensors to private tensors via the DP wizard\n", "- The user creates metadata (This is a dict containing any additional information to be shared.)\n", "- User uploads the dataset:\n", " - assets: dict of private tensors to be uploaded to the domain\n", " - description: description of the dataset\n", " - name: name of the dataset\n", " - metadata: a dictionary containing any additional public information to be shared" ] }, { "cell_type": "code", "execution_count": null, "id": "6c0bc1c7", "metadata": {}, "outputs": [], "source": [ "import syft as sy" ] }, { "cell_type": "code", "execution_count": null, "id": "ae6ec0cd", "metadata": {}, "outputs": [], "source": [ "# Let's login into the domain\n", "\n", "usa_domain = sy.login(\n", " url=\"https://usa.openmined.org\",\n", " email=\"wadewilson@canada.com\",\n", " password=\"supersecretpassword\",\n", ")" ] }, { "cell_type": "code", "execution_count": 15, "id": "b0ad1180", "metadata": {}, "outputs": [], "source": [ "# Let's load the dataset into memory\n", "\n", "import os\n", "import pydicom\n", "import pandas as pd\n", "\n", "\n", "label_mapping = {\n", " \"Pneumothorax\": 1,\n", " \"No Pneumothorax\": 0,\n", "}\n", "\n", "data = pd.read_csv(\"data/siim_small/labels.csv\")\n", "\n", "\n", "image_data = []\n", "label_data = []\n", "\n", "ROOT_PATH = \"/home/user/Documents/myfolder/pysyft/PySyft/notebooks/course3/data/siim_small/\"\n", "for idx in range(data.shape[0]):\n", " img_path = data[\"file\"][idx]\n", " label = data[\"label\"][idx]\n", " label = label_mapping.get(label)\n", " img_path = os.path.join(ROOT_PATH, img_path)\n", " img = pydicom.dcmread(img_path)\n", " image_data.append(im.pixel_array).astype(np.int32)\n", " label_data.append(label)\n", " \n", "# Let's convert the numpy array to tensors\n", "image_tensors = sy.Tensor(image_data)\n", "label_tensors = sy.Tensor(label_data)" ] }, { "cell_type": "code", "execution_count": null, "id": "b02cc298", "metadata": {}, "outputs": [], "source": [ "# Let's make the data private\n", "image_tensors = image_tensors.private(min_val=0, max_val=256)\n", "label_tensors = label_tensors.private(min_val=0, max_val=1)" ] }, { "cell_type": "markdown", "id": "66fe7aa9", "metadata": {}, "source": [ "ALERT: You didn't pass in any entities. Launching entity wizard...\n", "\n", "\t=====================================================================\n", "\tWelcome to the Data Subject Annotation Wizard!!!\n", "\t=====================================================================\n", "\n", "\tYou've arrived here because you called Tensor.private() without\n", "\tpassing in any entities! Since the purpose of .private() is to add\n", "\tmetadata for the support of automatic differential privacy budgeting,\n", "\tyou need to describe which parts of your Tensor correspond to which\n", "\treal-world data subjects (entities) whose privacy you want to\n", "\tprotect. This is the only way the system knows, for example, that it\n", "\tcosts twice as much privacy budget when twice as much of your data\n", "\t(say, 2 rows instead of 1 row) refer to the same entity.\n", "\n", "\tEntities can be people (such as a medical patient), places (such as a\n", "\tfamily's address), or even organizations (such as a business, state,\n", "\tor country). If you're not sure what kind of entity to include, just\n", "\task yourself the question, \"who am I trying to protect the privacy\n", "\tof?\". If it's an organization, make one entity per organization. If\n", "\tit's people, make one entity per person. If it's a group of people\n", "\twho are somehow similar/linked to each other (such as a family), make\n", "\teach entity a different group. For more information on differential\n", "\tprivacy, see OpenMined's course on the subject:\n", "\thttps://courses.openmined.org/\n", "\n", "\tSince you didn't pass in entities into .private() (or you did so\n", "\tincorrectly), this wizard is going to guide you through the process\n", "\tof annotating your data with entities.\n", "\n", "\tIn this wizard, we're going to ask you for *unique identifiers* which\n", "\trefer to the entities in your data. While the unique identifiers need\n", "\tnot be personal data (they can be random strings of letters and\n", "\tnumbers if you like). It is ESSENTIAL that you use the same\n", "\tidentifier when referring to the same entity in the data that you\n", "\tnever accidentally refer to two entities by the same identifier.\n", "\tAdditionally, if you plan to do any kind of data JOIN with another\n", "\tdataset, it is ESSENTIAL that you are using the same unique\n", "\tidentifiers for entities as the data you're joining with. Since these\n", "\tunique identifiers may be personal information, PySyft might not be\n", "\table to detect if two tensors are using different identifiers for the\n", "\tsame person.\n", "\n", "\tSo, in this tutorial we're going to be asking you to specify Unique\n", "\tIdentifiers (UIDs) for each entity in your data. This could be an\n", "\temail, street address, or any other string that identifies someone\n", "\tuniquely in your data and in the data you intend to use with your\n", "\tdata (if any).\n", "\n", "\tDo you understand, and are you ready to proceed? (yes/no)\n", "\n", "\t yes\n", "\n", "\n", "\tExcellent! Let's begin!\n", "\n", "\t---------------------------------------------------------------------\n", "\n", "\tQuestion 1: Is this entire tensor referring to the same entity?\n", "\n", "\tExamples:\n", "\t - a single medical scan of one patient\n", "\t - a single spreadsheet of proprietary statistics about a business\n", "\t - a tensor of facts about a country\n", "\n", "\t(if the tensor is about one entity, but it also contains multiple\n", "\tother entities within, such as a tensor about all the customers of\n", "\tone business, ask yourself, are you trying to protect the people or\n", "\tthe business)\n", "\n", "\tIf yes, write the UID of the entity this data is about, otherwise\n", "\twrite 'no' because this data is about more than one entity.\n", "\n", "\t no\n", "\n", "\n", "\t---------------------------------------------------------------------\n", "\n", "\tQuestion 2: Does each row correspond to an entity, perhaps with\n", "\toccasional repeats (yes/no)?\n", "\n", "\t no\n", "\n", "\n", "\t---------------------------------------------------------------------\n", "\n", "\tQuestion 3: Is your data one entity for every column (yes/no)?\n", "\n", "\t no\n", "\n", "\n", "\tIt sounds like your tensor is a random assortment of entities (and\n", "\tperhaps empty/non-entities). If you have empty values, just create\n", "\trandom entities for them for now. If you have various entities\n", "\tscattered throughout your tensor (not organized by row), then you'll\n", "\tneed to pass in a np.ndarray of strings which is identically shaped\n", "\tto your data in entities like so:\n", "\n", "\n", "\t_____________________________________________________________________" ] }, { "cell_type": "code", "execution_count": null, "id": "29b5d09d", "metadata": {}, "outputs": [], "source": [ "# Let's create the metadata required \n", "metadata = {\n", " \"label_mapping\": label_mapping,\n", "}" ] }, { "cell_type": "code", "execution_count": 32, "id": "14d87a4f", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "Loading dataset... checking asset types... \n", "\n", "WARNING - Non-DP Asset: You just passed in a asset 'More Trade' which cannot be tracked with differential privacy because it is a <class 'pandas.core.frame.DataFrame'> object.\n", "\n", "This means you'll need to manually approve any requests which leverage this data. If this is ok with you, proceed. If you'd like to use automatic differential privacy budgeting, please pass in a DP-compatible tensor type such as by calling .private() on a sy.Tensor with a np.int32 or np.float32 inside.\n", "\n", "Are you sure you want to proceed? (y/n) y\n", "\n", "Loading dataset... uploading... SUCCESS! \n", "\n", "Run <your client variable>.datasets to see your new dataset loaded into your machine!\n", "\n", "\n" ] } ], "source": [ "# Let's load the dataset onto the domain\n", "\n", "ca.load_dataset(\n", " assets={\"imageData\": image_tensors, \"labels\": label_tensors},\n", " name=\"SIIM-ACR Pneumothorax Segmentation\",\n", " description=\"Pneumothorax is usually diagnosed by a radiologist on a chest x-ray, and can sometimes be very difficult to confirm. An accurate AI algorithm to detect pneumothorax would be useful in a lot of clinical scenarios.\",\n", " metadata=metadata,\n", ")" ] }, { "cell_type": "code", "execution_count": null, "id": "2be72680", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "999b5016", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "id": "176bb8de", "metadata": { "heading_collapsed": true }, "source": [ "#### Dummy Date" ] }, { "cell_type": "code", "execution_count": 2, "id": "89cf19a2", "metadata": { "hidden": true }, "outputs": [], "source": [ "import pandas as pd\n", "from enum import Enum\n", "import uuid\n", "import torch\n", "import datetime\n", "import json\n", "import numpy as np\n", "\n", "\n", "class bcolors(Enum):\n", " HEADER = \"\\033[95m\"\n", " OKBLUE = \"\\033[94m\"\n", " OKCYAN = \"\\033[96m\"\n", " OKGREEN = \"\\033[92m\"\n", " WARNING = \"\\033[93m\"\n", " FAIL = \"\\033[91m\"\n", " ENDC = \"\\033[0m\"\n", " BOLD = \"\\033[1m\"\n", " UNDERLINE = \"\\033[4m\"" ] }, { "cell_type": "code", "execution_count": 4, "id": "107b6c9a", "metadata": { "hidden": true }, "outputs": [], "source": [ "logintodomain = \"\"\"\n", " Connecting to http://ca.openmined.org... done! \t Logging into Canada... done!\n", "\"\"\"" ] }, { "cell_type": "code", "execution_count": 31, "id": "239eb1ae", "metadata": { "hidden": true }, "outputs": [], "source": [ "loading_data = \"\"\"\n", "Loading dataset... checking asset types... \n", "\n", "WARNING - Non-DP Asset: You just passed in a asset 'More Trade' which cannot be tracked with differential privacy because it is a <class 'pandas.core.frame.DataFrame'> object.\n", "\n", "This means you'll need to manually approve any requests which leverage this data. If this is ok with you, proceed. If you'd like to use automatic differential privacy budgeting, please pass in a DP-compatible tensor type such as by calling .private() on a sy.Tensor with a np.int32 or np.float32 inside.\n", "\n", "Are you sure you want to proceed? (y/n) y\n", "\n", "Loading dataset... uploading... SUCCESS! \n", "\n", "Run <your client variable>.datasets to see your new dataset loaded into your machine!\n", "\n", "\"\"\"" ] }, { "cell_type": "code", "execution_count": null, "id": "37f3c393", "metadata": { "hidden": true }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.6" } }, "nbformat": 4, "nbformat_minor": 5 }
Jupyter Notebook
4
vishalbelsare/PySyft
notebooks/course3/DO Uploads a Dataset.ipynb
[ "Apache-1.1" ]
module Views.SilenceView.Types exposing (Model, SilenceViewMsg(..), initSilenceView) import Browser.Navigation exposing (Key) import Data.GettableAlert exposing (GettableAlert) import Data.GettableSilence exposing (GettableSilence) import Utils.Types exposing (ApiData(..)) type SilenceViewMsg = SilenceFetched (ApiData GettableSilence) | SetActiveAlert (Maybe String) | AlertGroupsPreview (ApiData (List GettableAlert)) | InitSilenceView String | ConfirmDestroySilence | Reload String type alias Model = { silence : ApiData GettableSilence , alerts : ApiData (List GettableAlert) , activeAlertId : Maybe String , showConfirmationDialog : Bool , key : Key } initSilenceView : Key -> Model initSilenceView key = { silence = Initial , alerts = Initial , activeAlertId = Nothing , showConfirmationDialog = False , key = key }
Elm
4
creganFL/alertmanager
ui/app/src/Views/SilenceView/Types.elm
[ "ECL-2.0", "Apache-2.0" ]
/* * Copyright (c) 2020, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include "Game.h" #include <LibGUI/Frame.h> class BoardView final : public GUI::Frame { C_OBJECT(BoardView); public: virtual ~BoardView() override; void set_board(Game::Board const* board); Function<void(Game::Direction)> on_move; private: explicit BoardView(Game::Board const*); virtual void resize_event(GUI::ResizeEvent&) override; virtual void paint_event(GUI::PaintEvent&) override; virtual void keydown_event(GUI::KeyEvent&) override; virtual void timer_event(Core::TimerEvent&) override; size_t rows() const; size_t columns() const; void pick_font(); void resize(); Color background_color_for_cell(u32 value); Color text_color_for_cell(u32 value); float m_padding { 0 }; float m_min_cell_size { 0 }; float m_cell_size { 0 }; Game::Board const* m_board { nullptr }; static constexpr int frame_duration_ms = 1000 / 60; static constexpr int animation_duration = 5; int pop_in_animation_frame = 0; int slide_animation_frame = 0; };
C
4
r00ster91/serenity
Userland/Games/2048/BoardView.h
[ "BSD-2-Clause" ]
/** * */ import Util; import OpenApi; import OpenApiUtil; import EndpointUtil; extends OpenApi; init(config: OpenApi.Config){ super(config); @endpointRule = ''; checkConfig(config); @endpoint = getEndpoint('aiops', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint); } function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{ if (!Util.empty(endpoint)) { return endpoint; } if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) { return endpointMap[regionId]; } return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix); } model ListAuthRequest { userId?: string(name='UserId'), } model ListAuthResponseBody = { message?: string(name='Message'), requestId?: string(name='RequestId'), list?: [ string ](name='List'), } model ListAuthResponse = { headers: map[string]string(name='headers'), body: ListAuthResponseBody(name='body'), } async function listAuthWithOptions(request: ListAuthRequest, runtime: Util.RuntimeOptions): ListAuthResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('ListAuth', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function listAuth(request: ListAuthRequest): ListAuthResponse { var runtime = new Util.RuntimeOptions{}; return listAuthWithOptions(request, runtime); } model GetEventStatisticsRequest { startTime?: string(name='StartTime'), endTime?: string(name='EndTime'), uid?: long(name='Uid'), operaUid?: string(name='OperaUid'), } model GetEventStatisticsResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), status?: string(name='Status'), msg?: string(name='Msg'), data?: map[string]any(name='Data'), } model GetEventStatisticsResponse = { headers: map[string]string(name='headers'), body: GetEventStatisticsResponseBody(name='body'), } async function getEventStatisticsWithOptions(request: GetEventStatisticsRequest, runtime: Util.RuntimeOptions): GetEventStatisticsResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetEventStatistics', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getEventStatistics(request: GetEventStatisticsRequest): GetEventStatisticsResponse { var runtime = new Util.RuntimeOptions{}; return getEventStatisticsWithOptions(request, runtime); } model GetSynCloudResourceListRequest { operaUid?: string(name='OperaUid'), } model GetSynCloudResourceListResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), msg?: string(name='Msg'), status?: string(name='Status'), data?: map[string]any(name='Data'), pageTotal?: int32(name='PageTotal'), } model GetSynCloudResourceListResponse = { headers: map[string]string(name='headers'), body: GetSynCloudResourceListResponseBody(name='body'), } async function getSynCloudResourceListWithOptions(request: GetSynCloudResourceListRequest, runtime: Util.RuntimeOptions): GetSynCloudResourceListResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetSynCloudResourceList', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getSynCloudResourceList(request: GetSynCloudResourceListRequest): GetSynCloudResourceListResponse { var runtime = new Util.RuntimeOptions{}; return getSynCloudResourceListWithOptions(request, runtime); } model PutAlertContactGroupRequest { alertContactGroupJson?: string(name='AlertContactGroupJson'), contactIdsJson?: string(name='ContactIdsJson'), } model PutAlertContactGroupResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: boolean(name='Data'), } model PutAlertContactGroupResponse = { headers: map[string]string(name='headers'), body: PutAlertContactGroupResponseBody(name='body'), } async function putAlertContactGroupWithOptions(request: PutAlertContactGroupRequest, runtime: Util.RuntimeOptions): PutAlertContactGroupResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('PutAlertContactGroup', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function putAlertContactGroup(request: PutAlertContactGroupRequest): PutAlertContactGroupResponse { var runtime = new Util.RuntimeOptions{}; return putAlertContactGroupWithOptions(request, runtime); } model DescribeReportDataResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: { heathScore?: long(name='HeathScore'), heathScoreTrendList?: [ long ](name='HeathScoreTrendList'), preUpdateTime?: string(name='PreUpdateTime'), riskCount?: long(name='RiskCount'), riskCountTrendList?: [ long ](name='RiskCountTrendList'), }(name='Data'), } model DescribeReportDataResponse = { headers: map[string]string(name='headers'), body: DescribeReportDataResponseBody(name='body'), } async function describeReportDataWithOptions(runtime: Util.RuntimeOptions): DescribeReportDataResponse { var req = new OpenApi.OpenApiRequest{}; return doRPCRequest('DescribeReportData', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeReportData(): DescribeReportDataResponse { var runtime = new Util.RuntimeOptions{}; return describeReportDataWithOptions(runtime); } model GetResourceTypeListResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), msg?: string(name='Msg'), status?: boolean(name='Status'), data?: map[string]any(name='Data'), } model GetResourceTypeListResponse = { headers: map[string]string(name='headers'), body: GetResourceTypeListResponseBody(name='body'), } async function getResourceTypeListWithOptions(runtime: Util.RuntimeOptions): GetResourceTypeListResponse { var req = new OpenApi.OpenApiRequest{}; return doRPCRequest('GetResourceTypeList', '2020-08-06', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function getResourceTypeList(): GetResourceTypeListResponse { var runtime = new Util.RuntimeOptions{}; return getResourceTypeListWithOptions(runtime); } model DeleteAlertSettingRequest { alertSettingId?: long(name='AlertSettingId', description='报警设置ID'), } model DeleteAlertSettingResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: boolean(name='Data'), } model DeleteAlertSettingResponse = { headers: map[string]string(name='headers'), body: DeleteAlertSettingResponseBody(name='body'), } async function deleteAlertSettingWithOptions(request: DeleteAlertSettingRequest, runtime: Util.RuntimeOptions): DeleteAlertSettingResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DeleteAlertSetting', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function deleteAlertSetting(request: DeleteAlertSettingRequest): DeleteAlertSettingResponse { var runtime = new Util.RuntimeOptions{}; return deleteAlertSettingWithOptions(request, runtime); } model CreateAlertContactGroupRequest { alertContactGroupJson?: string(name='AlertContactGroupJson'), contactIdsJson?: string(name='ContactIdsJson'), operaUid?: string(name='OperaUid'), } model CreateAlertContactGroupResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: boolean(name='Data'), } model CreateAlertContactGroupResponse = { headers: map[string]string(name='headers'), body: CreateAlertContactGroupResponseBody(name='body'), } async function createAlertContactGroupWithOptions(request: CreateAlertContactGroupRequest, runtime: Util.RuntimeOptions): CreateAlertContactGroupResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('CreateAlertContactGroup', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function createAlertContactGroup(request: CreateAlertContactGroupRequest): CreateAlertContactGroupResponse { var runtime = new Util.RuntimeOptions{}; return createAlertContactGroupWithOptions(request, runtime); } model GetEventSequentialTrentRequest { eventId?: string(name='EventId'), aliUid?: string(name='AliUid'), operaUid?: string(name='OperaUid'), } model GetEventSequentialTrentResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: map[string]any(name='Data'), pageTotal?: int32(name='PageTotal'), } model GetEventSequentialTrentResponse = { headers: map[string]string(name='headers'), body: GetEventSequentialTrentResponseBody(name='body'), } async function getEventSequentialTrentWithOptions(request: GetEventSequentialTrentRequest, runtime: Util.RuntimeOptions): GetEventSequentialTrentResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetEventSequentialTrent', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getEventSequentialTrent(request: GetEventSequentialTrentRequest): GetEventSequentialTrentResponse { var runtime = new Util.RuntimeOptions{}; return getEventSequentialTrentWithOptions(request, runtime); } model RunCommandRequest { commandContent?: string(name='CommandContent'), regionId?: string(name='RegionId'), instanceIds?: string(name='InstanceIds'), type?: string(name='Type'), name?: string(name='Name'), } model RunCommandResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), status?: boolean(name='Status'), message?: string(name='Message'), data?: map[string]any(name='Data'), } model RunCommandResponse = { headers: map[string]string(name='headers'), body: RunCommandResponseBody(name='body'), } async function runCommandWithOptions(request: RunCommandRequest, runtime: Util.RuntimeOptions): RunCommandResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('RunCommand', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function runCommand(request: RunCommandRequest): RunCommandResponse { var runtime = new Util.RuntimeOptions{}; return runCommandWithOptions(request, runtime); } model GetCidInfoRequest { uid?: long(name='Uid'), } model GetCidInfoResponseBody = { requestId?: string(name='RequestId'), code?: int32(name='Code'), status?: string(name='Status'), message?: string(name='Message'), data?: map[string]any(name='Data'), } model GetCidInfoResponse = { headers: map[string]string(name='headers'), body: GetCidInfoResponseBody(name='body'), } async function getCidInfoWithOptions(request: GetCidInfoRequest, runtime: Util.RuntimeOptions): GetCidInfoResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetCidInfo', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getCidInfo(request: GetCidInfoRequest): GetCidInfoResponse { var runtime = new Util.RuntimeOptions{}; return getCidInfoWithOptions(request, runtime); } model GetBusinessGroupInfoRequest { businessGroupId?: string(name='BusinessGroupId'), operaUid?: string(name='OperaUid'), } model GetBusinessGroupInfoResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), msg?: string(name='Msg'), status?: boolean(name='Status'), data?: map[string]any(name='Data'), } model GetBusinessGroupInfoResponse = { headers: map[string]string(name='headers'), body: GetBusinessGroupInfoResponseBody(name='body'), } async function getBusinessGroupInfoWithOptions(request: GetBusinessGroupInfoRequest, runtime: Util.RuntimeOptions): GetBusinessGroupInfoResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetBusinessGroupInfo', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getBusinessGroupInfo(request: GetBusinessGroupInfoRequest): GetBusinessGroupInfoResponse { var runtime = new Util.RuntimeOptions{}; return getBusinessGroupInfoWithOptions(request, runtime); } model GetAlertListRequest { eventId?: string(name='EventId'), aliUid?: string(name='AliUid'), operaUid?: string(name='OperaUid'), } model GetAlertListResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: map[string]any(name='Data'), pageTotal?: int32(name='PageTotal'), } model GetAlertListResponse = { headers: map[string]string(name='headers'), body: GetAlertListResponseBody(name='body'), } async function getAlertListWithOptions(request: GetAlertListRequest, runtime: Util.RuntimeOptions): GetAlertListResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetAlertList', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getAlertList(request: GetAlertListRequest): GetAlertListResponse { var runtime = new Util.RuntimeOptions{}; return getAlertListWithOptions(request, runtime); } model DescribeDiagnoseRequest { product?: string(name='Product'), } model DescribeDiagnoseResponseBody = { status?: string(name='Status'), message?: string(name='Message'), requestId?: string(name='RequestId'), code?: int32(name='Code'), diagnoseResult?: map[string]any(name='DiagnoseResult'), } model DescribeDiagnoseResponse = { headers: map[string]string(name='headers'), body: DescribeDiagnoseResponseBody(name='body'), } async function describeDiagnoseWithOptions(request: DescribeDiagnoseRequest, runtime: Util.RuntimeOptions): DescribeDiagnoseResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeDiagnose', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeDiagnose(request: DescribeDiagnoseRequest): DescribeDiagnoseResponse { var runtime = new Util.RuntimeOptions{}; return describeDiagnoseWithOptions(request, runtime); } model DeleteAlertContactFromGroupRequest { contactIdListJson?: string(name='ContactIdListJson'), groupId?: long(name='GroupId'), } model DeleteAlertContactFromGroupResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: boolean(name='Data'), } model DeleteAlertContactFromGroupResponse = { headers: map[string]string(name='headers'), body: DeleteAlertContactFromGroupResponseBody(name='body'), } async function deleteAlertContactFromGroupWithOptions(request: DeleteAlertContactFromGroupRequest, runtime: Util.RuntimeOptions): DeleteAlertContactFromGroupResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DeleteAlertContactFromGroup', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function deleteAlertContactFromGroup(request: DeleteAlertContactFromGroupRequest): DeleteAlertContactFromGroupResponse { var runtime = new Util.RuntimeOptions{}; return deleteAlertContactFromGroupWithOptions(request, runtime); } model DescribeAlertDetailDataRequest { alertId?: long(name='AlertId'), operaUid?: string(name='OperaUid'), } model DescribeAlertDetailDataResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: { alertName?: string(name='AlertName'), algorithm?: string(name='Algorithm'), beginTime?: string(name='BeginTime'), category?: string(name='Category'), endTime?: string(name='EndTime'), instanceId?: string(name='InstanceId'), instanceName?: string(name='InstanceName'), instanceRegionName?: string(name='InstanceRegionName'), mttr?: string(name='Mttr'), }(name='Data'), } model DescribeAlertDetailDataResponse = { headers: map[string]string(name='headers'), body: DescribeAlertDetailDataResponseBody(name='body'), } async function describeAlertDetailDataWithOptions(request: DescribeAlertDetailDataRequest, runtime: Util.RuntimeOptions): DescribeAlertDetailDataResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeAlertDetailData', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeAlertDetailData(request: DescribeAlertDetailDataRequest): DescribeAlertDetailDataResponse { var runtime = new Util.RuntimeOptions{}; return describeAlertDetailDataWithOptions(request, runtime); } model PutAlertSettingRequest { sendDingtalkNotice?: boolean(name='SendDingtalkNotice'), sendSmsNotice?: boolean(name='SendSmsNotice'), contactIdsJson?: string(name='ContactIdsJson'), contactGroupIdsJson?: string(name='ContactGroupIdsJson'), sendEmailNotice?: boolean(name='SendEmailNotice'), customerUid?: long(name='CustomerUid', description='废弃'), alertSettingId?: long(name='AlertSettingId'), alertName?: string(name='AlertName'), businessGroupIdsJson?: string(name='BusinessGroupIdsJson'), stopDuration?: long(name='StopDuration'), operaUid?: string(name='OperaUid'), } model PutAlertSettingResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: boolean(name='Data'), } model PutAlertSettingResponse = { headers: map[string]string(name='headers'), body: PutAlertSettingResponseBody(name='body'), } async function putAlertSettingWithOptions(request: PutAlertSettingRequest, runtime: Util.RuntimeOptions): PutAlertSettingResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('PutAlertSetting', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function putAlertSetting(request: PutAlertSettingRequest): PutAlertSettingResponse { var runtime = new Util.RuntimeOptions{}; return putAlertSettingWithOptions(request, runtime); } model GetEventRootCauseRequest { operaUid?: string(name='OperaUid'), eventId?: string(name='EventId'), } model GetEventRootCauseResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), msg?: string(name='Msg'), status?: string(name='Status'), data?: map[string]any(name='Data'), pageTotal?: int32(name='PageTotal'), } model GetEventRootCauseResponse = { headers: map[string]string(name='headers'), body: GetEventRootCauseResponseBody(name='body'), } async function getEventRootCauseWithOptions(request: GetEventRootCauseRequest, runtime: Util.RuntimeOptions): GetEventRootCauseResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetEventRootCause', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getEventRootCause(request: GetEventRootCauseRequest): GetEventRootCauseResponse { var runtime = new Util.RuntimeOptions{}; return getEventRootCauseWithOptions(request, runtime); } model ListAuthorizedUidResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), status?: string(name='Status'), message?: string(name='Message'), list?: [ long ](name='List'), } model ListAuthorizedUidResponse = { headers: map[string]string(name='headers'), body: ListAuthorizedUidResponseBody(name='body'), } async function listAuthorizedUidWithOptions(runtime: Util.RuntimeOptions): ListAuthorizedUidResponse { var req = new OpenApi.OpenApiRequest{}; return doRPCRequest('ListAuthorizedUid', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function listAuthorizedUid(): ListAuthorizedUidResponse { var runtime = new Util.RuntimeOptions{}; return listAuthorizedUidWithOptions(runtime); } model GetBusinessGroupListRequest { aliUid?: string(name='AliUid'), currentPage?: int32(name='CurrentPage'), pageSize?: int32(name='PageSize'), operaUid?: string(name='OperaUid'), } model GetBusinessGroupListResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), status?: boolean(name='Status'), msg?: string(name='Msg'), data?: map[string]any(name='Data'), pageTotal?: int32(name='PageTotal'), } model GetBusinessGroupListResponse = { headers: map[string]string(name='headers'), body: GetBusinessGroupListResponseBody(name='body'), } async function getBusinessGroupListWithOptions(request: GetBusinessGroupListRequest, runtime: Util.RuntimeOptions): GetBusinessGroupListResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetBusinessGroupList', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getBusinessGroupList(request: GetBusinessGroupListRequest): GetBusinessGroupListResponse { var runtime = new Util.RuntimeOptions{}; return getBusinessGroupListWithOptions(request, runtime); } model DeleteAlertContactRequest { contactIdListJson?: string(name='ContactIdListJson', description='要删除的数组,json格式'), groupId?: long(name='GroupId'), } model DeleteAlertContactResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: boolean(name='Data'), } model DeleteAlertContactResponse = { headers: map[string]string(name='headers'), body: DeleteAlertContactResponseBody(name='body'), } async function deleteAlertContactWithOptions(request: DeleteAlertContactRequest, runtime: Util.RuntimeOptions): DeleteAlertContactResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DeleteAlertContact', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function deleteAlertContact(request: DeleteAlertContactRequest): DeleteAlertContactResponse { var runtime = new Util.RuntimeOptions{}; return deleteAlertContactWithOptions(request, runtime); } model CloseEventRequest { id?: string(name='Id'), closeDesc?: string(name='CloseDesc'), } model CloseEventResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: string(name='Code'), status?: string(name='Status'), msg?: string(name='Msg'), data?: boolean(name='Data'), } model CloseEventResponse = { headers: map[string]string(name='headers'), body: CloseEventResponseBody(name='body'), } async function closeEventWithOptions(request: CloseEventRequest, runtime: Util.RuntimeOptions): CloseEventResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('CloseEvent', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function closeEvent(request: CloseEventRequest): CloseEventResponse { var runtime = new Util.RuntimeOptions{}; return closeEventWithOptions(request, runtime); } model DescribeDiagnoseResultRequest { checkId?: string(name='CheckId'), } model DescribeDiagnoseResultResponseBody = { status?: string(name='Status'), message?: string(name='Message'), requestId?: string(name='RequestId'), code?: int32(name='Code'), diagnoseResult?: map[string]any(name='DiagnoseResult'), } model DescribeDiagnoseResultResponse = { headers: map[string]string(name='headers'), body: DescribeDiagnoseResultResponseBody(name='body'), } async function describeDiagnoseResultWithOptions(request: DescribeDiagnoseResultRequest, runtime: Util.RuntimeOptions): DescribeDiagnoseResultResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeDiagnoseResult', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeDiagnoseResult(request: DescribeDiagnoseResultRequest): DescribeDiagnoseResultResponse { var runtime = new Util.RuntimeOptions{}; return describeDiagnoseResultWithOptions(request, runtime); } model ConfirmAuthorizationRequest { type?: string(name='Type'), uid?: long(name='Uid'), } model ConfirmAuthorizationResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), status?: string(name='Status'), message?: string(name='Message'), data?: string(name='Data'), } model ConfirmAuthorizationResponse = { headers: map[string]string(name='headers'), body: ConfirmAuthorizationResponseBody(name='body'), } async function confirmAuthorizationWithOptions(request: ConfirmAuthorizationRequest, runtime: Util.RuntimeOptions): ConfirmAuthorizationResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('ConfirmAuthorization', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function confirmAuthorization(request: ConfirmAuthorizationRequest): ConfirmAuthorizationResponse { var runtime = new Util.RuntimeOptions{}; return confirmAuthorizationWithOptions(request, runtime); } model CreateCommandRequest { commandContent?: string(name='CommandContent'), name?: string(name='Name'), regionId?: string(name='RegionId'), type?: string(name='Type'), description?: string(name='Description'), workingDir?: string(name='WorkingDir'), timeout?: long(name='timeout'), } model CreateCommandResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), } model CreateCommandResponse = { headers: map[string]string(name='headers'), body: CreateCommandResponseBody(name='body'), } async function createCommandWithOptions(request: CreateCommandRequest, runtime: Util.RuntimeOptions): CreateCommandResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('CreateCommand', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function createCommand(request: CreateCommandRequest): CreateCommandResponse { var runtime = new Util.RuntimeOptions{}; return createCommandWithOptions(request, runtime); } model GetUserLoginInfoRequest { accountName?: string(name='AccountName'), accountPrincipalName?: string(name='AccountPrincipalName'), mainAccountPk?: string(name='MainAccountPk'), currentPk?: string(name='CurrentPk'), accountType?: string(name='AccountType'), } model GetUserLoginInfoResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), status?: string(name='Status'), msg?: string(name='Msg'), data?: map[string]any(name='Data'), } model GetUserLoginInfoResponse = { headers: map[string]string(name='headers'), body: GetUserLoginInfoResponseBody(name='body'), } async function getUserLoginInfoWithOptions(request: GetUserLoginInfoRequest, runtime: Util.RuntimeOptions): GetUserLoginInfoResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetUserLoginInfo', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getUserLoginInfo(request: GetUserLoginInfoRequest): GetUserLoginInfoResponse { var runtime = new Util.RuntimeOptions{}; return getUserLoginInfoWithOptions(request, runtime); } model GetConnectInstancesRequest { uid?: long(name='Uid'), } model GetConnectInstancesResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: long(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: [ map[string]any ](name='Data'), } model GetConnectInstancesResponse = { headers: map[string]string(name='headers'), body: GetConnectInstancesResponseBody(name='body'), } async function getConnectInstancesWithOptions(request: GetConnectInstancesRequest, runtime: Util.RuntimeOptions): GetConnectInstancesResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetConnectInstances', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getConnectInstances(request: GetConnectInstancesRequest): GetConnectInstancesResponse { var runtime = new Util.RuntimeOptions{}; return getConnectInstancesWithOptions(request, runtime); } model DeleteAlertContactGroupRequest { groupId?: long(name='GroupId'), } model DeleteAlertContactGroupResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: boolean(name='Data'), } model DeleteAlertContactGroupResponse = { headers: map[string]string(name='headers'), body: DeleteAlertContactGroupResponseBody(name='body'), } async function deleteAlertContactGroupWithOptions(request: DeleteAlertContactGroupRequest, runtime: Util.RuntimeOptions): DeleteAlertContactGroupResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DeleteAlertContactGroup', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function deleteAlertContactGroup(request: DeleteAlertContactGroupRequest): DeleteAlertContactGroupResponse { var runtime = new Util.RuntimeOptions{}; return deleteAlertContactGroupWithOptions(request, runtime); } model AddBusinessGroupRequest { aliUid?: string(name='AliUid'), businessGroupName?: string(name='BusinessGroupName'), businessGroupDesc?: string(name='BusinessGroupDesc'), resourceType?: int32(name='ResourceType'), createUser?: string(name='CreateUser'), updateUser?: string(name='UpdateUser'), instanceList?: [ string ](name='InstanceList'), operaUid?: string(name='OperaUid'), } model AddBusinessGroupShrinkRequest { aliUid?: string(name='AliUid'), businessGroupName?: string(name='BusinessGroupName'), businessGroupDesc?: string(name='BusinessGroupDesc'), resourceType?: int32(name='ResourceType'), createUser?: string(name='CreateUser'), updateUser?: string(name='UpdateUser'), instanceListShrink?: string(name='InstanceList'), operaUid?: string(name='OperaUid'), } model AddBusinessGroupResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), msg?: string(name='Msg'), status?: string(name='Status'), } model AddBusinessGroupResponse = { headers: map[string]string(name='headers'), body: AddBusinessGroupResponseBody(name='body'), } async function addBusinessGroupWithOptions(tmpReq: AddBusinessGroupRequest, runtime: Util.RuntimeOptions): AddBusinessGroupResponse { Util.validateModel(tmpReq); var request = new AddBusinessGroupShrinkRequest{}; OpenApiUtil.convert(tmpReq, request); if (!Util.isUnset(tmpReq.instanceList)) { request.instanceListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.instanceList, 'InstanceList', 'json'); } var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('AddBusinessGroup', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function addBusinessGroup(request: AddBusinessGroupRequest): AddBusinessGroupResponse { var runtime = new Util.RuntimeOptions{}; return addBusinessGroupWithOptions(request, runtime); } model DescribeAlertContactGroupRequest { pageSize?: long(name='PageSize'), currentPage?: long(name='CurrentPage'), searchLike?: string(name='SearchLike'), operaUid?: string(name='OperaUid'), } model DescribeAlertContactGroupResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), total?: int32(name='Total'), data?: [ { description?: string(name='description'), gmtCreate?: long(name='gmtCreate'), gmtModified?: long(name='gmtModified'), groupName?: string(name='groupName'), id?: long(name='id'), uid?: long(name='uid'), } ](name='Data'), } model DescribeAlertContactGroupResponse = { headers: map[string]string(name='headers'), body: DescribeAlertContactGroupResponseBody(name='body'), } async function describeAlertContactGroupWithOptions(request: DescribeAlertContactGroupRequest, runtime: Util.RuntimeOptions): DescribeAlertContactGroupResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeAlertContactGroup', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeAlertContactGroup(request: DescribeAlertContactGroupRequest): DescribeAlertContactGroupResponse { var runtime = new Util.RuntimeOptions{}; return describeAlertContactGroupWithOptions(request, runtime); } model GetSlsReportListRequest { productCode?: string(name='ProductCode'), logStore?: string(name='LogStore'), severity?: string(name='Severity'), instanceId?: string(name='InstanceId'), uid?: long(name='Uid'), currentPage?: int32(name='CurrentPage'), pageSize?: int32(name='PageSize'), } model GetSlsReportListResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), status?: string(name='Status'), message?: string(name='Message'), data?: map[string]any(name='Data'), pageTotal?: long(name='PageTotal'), } model GetSlsReportListResponse = { headers: map[string]string(name='headers'), body: GetSlsReportListResponseBody(name='body'), } async function getSlsReportListWithOptions(request: GetSlsReportListRequest, runtime: Util.RuntimeOptions): GetSlsReportListResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetSlsReportList', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getSlsReportList(request: GetSlsReportListRequest): GetSlsReportListResponse { var runtime = new Util.RuntimeOptions{}; return getSlsReportListWithOptions(request, runtime); } model FeedbackAlertAlgorithmRequest { alertId?: long(name='AlertId'), operaUid?: string(name='OperaUid'), algorithmAccurateState?: int32(name='AlgorithmAccurateState'), algorithmAccurateDescribe?: string(name='AlgorithmAccurateDescribe'), } model FeedbackAlertAlgorithmResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), msg?: string(name='Msg'), status?: string(name='Status'), data?: map[string]any(name='Data'), } model FeedbackAlertAlgorithmResponse = { headers: map[string]string(name='headers'), body: FeedbackAlertAlgorithmResponseBody(name='body'), } async function feedbackAlertAlgorithmWithOptions(request: FeedbackAlertAlgorithmRequest, runtime: Util.RuntimeOptions): FeedbackAlertAlgorithmResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('FeedbackAlertAlgorithm', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function feedbackAlertAlgorithm(request: FeedbackAlertAlgorithmRequest): FeedbackAlertAlgorithmResponse { var runtime = new Util.RuntimeOptions{}; return feedbackAlertAlgorithmWithOptions(request, runtime); } model GetAlertTrentRequest { eventId?: string(name='EventId'), aliUid?: string(name='AliUid'), operaUid?: string(name='OperaUid'), } model GetAlertTrentResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: map[string]any(name='Data'), pageTotal?: int32(name='PageTotal'), } model GetAlertTrentResponse = { headers: map[string]string(name='headers'), body: GetAlertTrentResponseBody(name='body'), } async function getAlertTrentWithOptions(request: GetAlertTrentRequest, runtime: Util.RuntimeOptions): GetAlertTrentResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetAlertTrent', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getAlertTrent(request: GetAlertTrentRequest): GetAlertTrentResponse { var runtime = new Util.RuntimeOptions{}; return getAlertTrentWithOptions(request, runtime); } model GetCloudAllResourceListRequest { uid?: string(name='Uid'), operaUid?: string(name='OperaUid'), } model GetCloudAllResourceListResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), msg?: string(name='Msg'), status?: boolean(name='Status'), data?: map[string]any(name='Data'), } model GetCloudAllResourceListResponse = { headers: map[string]string(name='headers'), body: GetCloudAllResourceListResponseBody(name='body'), } async function getCloudAllResourceListWithOptions(request: GetCloudAllResourceListRequest, runtime: Util.RuntimeOptions): GetCloudAllResourceListResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetCloudAllResourceList', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getCloudAllResourceList(request: GetCloudAllResourceListRequest): GetCloudAllResourceListResponse { var runtime = new Util.RuntimeOptions{}; return getCloudAllResourceListWithOptions(request, runtime); } model ListCausePlanRequest { eventId?: string(name='EventId'), rootCauseId?: string(name='RootCauseId'), instanceId?: string(name='InstanceId'), } model ListCausePlanResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), status?: string(name='Status'), message?: string(name='Message'), data?: map[string]any(name='Data'), } model ListCausePlanResponse = { headers: map[string]string(name='headers'), body: ListCausePlanResponseBody(name='body'), } async function listCausePlanWithOptions(request: ListCausePlanRequest, runtime: Util.RuntimeOptions): ListCausePlanResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('ListCausePlan', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function listCausePlan(request: ListCausePlanRequest): ListCausePlanResponse { var runtime = new Util.RuntimeOptions{}; return listCausePlanWithOptions(request, runtime); } model CreateMessageRequest { eventId?: string(name='EventId'), instanceId?: string(name='InstanceId'), } model CreateMessageResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), status?: boolean(name='Status'), message?: string(name='Message'), data?: map[string]any(name='Data'), } model CreateMessageResponse = { headers: map[string]string(name='headers'), body: CreateMessageResponseBody(name='body'), } async function createMessageWithOptions(request: CreateMessageRequest, runtime: Util.RuntimeOptions): CreateMessageResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('CreateMessage', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function createMessage(request: CreateMessageRequest): CreateMessageResponse { var runtime = new Util.RuntimeOptions{}; return createMessageWithOptions(request, runtime); } model PutAlertSettingStatusRequest { alertSettingId?: long(name='AlertSettingId', description='报警设置id'), settingStatus?: long(name='SettingStatus', description='报警设置状态0:禁用1:启用'), operaUid?: string(name='OperaUid'), } model PutAlertSettingStatusResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: boolean(name='Data'), } model PutAlertSettingStatusResponse = { headers: map[string]string(name='headers'), body: PutAlertSettingStatusResponseBody(name='body'), } async function putAlertSettingStatusWithOptions(request: PutAlertSettingStatusRequest, runtime: Util.RuntimeOptions): PutAlertSettingStatusResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('PutAlertSettingStatus', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function putAlertSettingStatus(request: PutAlertSettingStatusRequest): PutAlertSettingStatusResponse { var runtime = new Util.RuntimeOptions{}; return putAlertSettingStatusWithOptions(request, runtime); } model ListNotAuthorizedUidResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), list?: [ long ](name='List'), } model ListNotAuthorizedUidResponse = { headers: map[string]string(name='headers'), body: ListNotAuthorizedUidResponseBody(name='body'), } async function listNotAuthorizedUidWithOptions(runtime: Util.RuntimeOptions): ListNotAuthorizedUidResponse { var req = new OpenApi.OpenApiRequest{}; return doRPCRequest('ListNotAuthorizedUid', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function listNotAuthorizedUid(): ListNotAuthorizedUidResponse { var runtime = new Util.RuntimeOptions{}; return listNotAuthorizedUidWithOptions(runtime); } model ListConfirmAuthorizationResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), status?: string(name='Status'), message?: string(name='Message'), list?: [ { name?: string(name='name'), status?: string(name='status'), uid?: long(name='uid'), } ](name='List'), } model ListConfirmAuthorizationResponse = { headers: map[string]string(name='headers'), body: ListConfirmAuthorizationResponseBody(name='body'), } async function listConfirmAuthorizationWithOptions(runtime: Util.RuntimeOptions): ListConfirmAuthorizationResponse { var req = new OpenApi.OpenApiRequest{}; return doRPCRequest('ListConfirmAuthorization', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function listConfirmAuthorization(): ListConfirmAuthorizationResponse { var runtime = new Util.RuntimeOptions{}; return listConfirmAuthorizationWithOptions(runtime); } model GetRegionListResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), msg?: string(name='Msg'), status?: boolean(name='Status'), data?: map[string]any(name='Data'), } model GetRegionListResponse = { headers: map[string]string(name='headers'), body: GetRegionListResponseBody(name='body'), } async function getRegionListWithOptions(runtime: Util.RuntimeOptions): GetRegionListResponse { var req = new OpenApi.OpenApiRequest{}; return doRPCRequest('GetRegionList', '2020-08-06', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function getRegionList(): GetRegionListResponse { var runtime = new Util.RuntimeOptions{}; return getRegionListWithOptions(runtime); } model DescribeAlertSettingByIdRequest { alertSettingId?: long(name='AlertSettingId', description='报警设置id'), } model DescribeAlertSettingByIdResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: { alertBusinessSettingId?: long(name='AlertBusinessSettingId'), alertName?: string(name='AlertName'), dataCreateTime?: string(name='DataCreateTime'), dataCreateUser?: string(name='DataCreateUser'), dataModifyTime?: string(name='DataModifyTime'), dataModifyUser?: string(name='DataModifyUser'), sendDingtalkNotice?: boolean(name='SendDingtalkNotice'), sendEmailNotice?: boolean(name='SendEmailNotice'), sendSmsNotice?: boolean(name='SendSmsNotice'), settingStatus?: long(name='SettingStatus'), stopDuration?: long(name='StopDuration'), uid?: long(name='Uid'), }(name='Data'), } model DescribeAlertSettingByIdResponse = { headers: map[string]string(name='headers'), body: DescribeAlertSettingByIdResponseBody(name='body'), } async function describeAlertSettingByIdWithOptions(request: DescribeAlertSettingByIdRequest, runtime: Util.RuntimeOptions): DescribeAlertSettingByIdResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeAlertSettingById', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeAlertSettingById(request: DescribeAlertSettingByIdRequest): DescribeAlertSettingByIdResponse { var runtime = new Util.RuntimeOptions{}; return describeAlertSettingByIdWithOptions(request, runtime); } model DescribeAlertBusinessGroupWithAlertSettingIdRequest { alertSettingId?: long(name='AlertSettingId'), } model DescribeAlertBusinessGroupWithAlertSettingIdResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: [ { businessGroupId?: string(name='BusinessGroupId'), businessGroupName?: string(name='BusinessGroupName'), } ](name='Data'), } model DescribeAlertBusinessGroupWithAlertSettingIdResponse = { headers: map[string]string(name='headers'), body: DescribeAlertBusinessGroupWithAlertSettingIdResponseBody(name='body'), } async function describeAlertBusinessGroupWithAlertSettingIdWithOptions(request: DescribeAlertBusinessGroupWithAlertSettingIdRequest, runtime: Util.RuntimeOptions): DescribeAlertBusinessGroupWithAlertSettingIdResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeAlertBusinessGroupWithAlertSettingId', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeAlertBusinessGroupWithAlertSettingId(request: DescribeAlertBusinessGroupWithAlertSettingIdRequest): DescribeAlertBusinessGroupWithAlertSettingIdResponse { var runtime = new Util.RuntimeOptions{}; return describeAlertBusinessGroupWithAlertSettingIdWithOptions(request, runtime); } model GetAvgRepairTimeRequest { uid?: long(name='Uid'), operaUid?: string(name='OperaUid'), } model GetAvgRepairTimeResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), status?: boolean(name='Status'), msg?: string(name='Msg'), data?: map[string]any(name='Data'), } model GetAvgRepairTimeResponse = { headers: map[string]string(name='headers'), body: GetAvgRepairTimeResponseBody(name='body'), } async function getAvgRepairTimeWithOptions(request: GetAvgRepairTimeRequest, runtime: Util.RuntimeOptions): GetAvgRepairTimeResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetAvgRepairTime', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getAvgRepairTime(request: GetAvgRepairTimeRequest): GetAvgRepairTimeResponse { var runtime = new Util.RuntimeOptions{}; return getAvgRepairTimeWithOptions(request, runtime); } model GetAiopsEventListRequest { uid?: long(name='Uid'), name?: string(name='Name'), predictionState?: int32(name='PredictionState'), status?: int32(name='Status'), currentPage?: int32(name='CurrentPage'), pageSize?: int32(name='PageSize'), severity?: int32(name='Severity'), businessGroupId?: string(name='BusinessGroupId'), businessGroupName?: string(name='BusinessGroupName'), operaUid?: string(name='OperaUid'), } model GetAiopsEventListResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), msg?: string(name='Msg'), status?: string(name='Status'), pageTotal?: int32(name='PageTotal'), data?: map[string]any(name='Data'), } model GetAiopsEventListResponse = { headers: map[string]string(name='headers'), body: GetAiopsEventListResponseBody(name='body'), } async function getAiopsEventListWithOptions(request: GetAiopsEventListRequest, runtime: Util.RuntimeOptions): GetAiopsEventListResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetAiopsEventList', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getAiopsEventList(request: GetAiopsEventListRequest): GetAiopsEventListResponse { var runtime = new Util.RuntimeOptions{}; return getAiopsEventListWithOptions(request, runtime); } model GetRealDataRequest { uid?: long(name='Uid'), instanceId?: string(name='InstanceId'), flowName?: string(name='FlowName'), startTimestamp?: string(name='StartTimestamp'), endTimestamp?: string(name='EndTimestamp'), } model GetRealDataResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: long(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: map[string]any(name='Data'), } model GetRealDataResponse = { headers: map[string]string(name='headers'), body: GetRealDataResponseBody(name='body'), } async function getRealDataWithOptions(request: GetRealDataRequest, runtime: Util.RuntimeOptions): GetRealDataResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetRealData', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getRealData(request: GetRealDataRequest): GetRealDataResponse { var runtime = new Util.RuntimeOptions{}; return getRealDataWithOptions(request, runtime); } model GetCloudResourceListRequest { id?: string(name='Id'), uid?: string(name='Uid'), cloudRegionId?: string(name='CloudRegionId'), businessGroupId?: string(name='BusinessGroupId'), instanceName?: string(name='InstanceName'), instanceId?: string(name='InstanceId'), isOptional?: int32(name='IsOptional'), currentPage?: int32(name='CurrentPage'), pageSize?: int32(name='PageSize'), operaUid?: string(name='OperaUid'), } model GetCloudResourceListResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), msg?: string(name='Msg'), status?: string(name='Status'), data?: map[string]any(name='Data'), pageTotal?: int32(name='PageTotal'), } model GetCloudResourceListResponse = { headers: map[string]string(name='headers'), body: GetCloudResourceListResponseBody(name='body'), } async function getCloudResourceListWithOptions(request: GetCloudResourceListRequest, runtime: Util.RuntimeOptions): GetCloudResourceListResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetCloudResourceList', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getCloudResourceList(request: GetCloudResourceListRequest): GetCloudResourceListResponse { var runtime = new Util.RuntimeOptions{}; return getCloudResourceListWithOptions(request, runtime); } model DescribeAllAlertContactGroupRequest { operaUid?: string(name='OperaUid'), } model DescribeAllAlertContactGroupResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: [ { description?: string(name='description'), gmtCreate?: long(name='gmtCreate'), gmtModified?: long(name='gmtModified'), groupName?: string(name='groupName'), id?: long(name='id'), uid?: long(name='uid'), } ](name='Data'), } model DescribeAllAlertContactGroupResponse = { headers: map[string]string(name='headers'), body: DescribeAllAlertContactGroupResponseBody(name='body'), } async function describeAllAlertContactGroupWithOptions(request: DescribeAllAlertContactGroupRequest, runtime: Util.RuntimeOptions): DescribeAllAlertContactGroupResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeAllAlertContactGroup', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeAllAlertContactGroup(request: DescribeAllAlertContactGroupRequest): DescribeAllAlertContactGroupResponse { var runtime = new Util.RuntimeOptions{}; return describeAllAlertContactGroupWithOptions(request, runtime); } model DelBusinessGroupRequest { businessGroupId?: string(name='BusinessGroupId'), operaUid?: string(name='OperaUid'), } model DelBusinessGroupResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), msg?: string(name='Msg'), status?: string(name='Status'), } model DelBusinessGroupResponse = { headers: map[string]string(name='headers'), body: DelBusinessGroupResponseBody(name='body'), } async function delBusinessGroupWithOptions(request: DelBusinessGroupRequest, runtime: Util.RuntimeOptions): DelBusinessGroupResponse { Util.validateModel(request); var query = OpenApiUtil.query(Util.toMap(request)); var req = new OpenApi.OpenApiRequest{ query = query, }; return doRPCRequest('DelBusinessGroup', '2020-08-06', 'HTTPS', 'GET', 'AK', 'json', req, runtime); } async function delBusinessGroup(request: DelBusinessGroupRequest): DelBusinessGroupResponse { var runtime = new Util.RuntimeOptions{}; return delBusinessGroupWithOptions(request, runtime); } model ApplyAuthorizationRequest { uid?: long(name='Uid'), } model ApplyAuthorizationResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), status?: string(name='Status'), message?: string(name='Message'), data?: string(name='Data'), } model ApplyAuthorizationResponse = { headers: map[string]string(name='headers'), body: ApplyAuthorizationResponseBody(name='body'), } async function applyAuthorizationWithOptions(request: ApplyAuthorizationRequest, runtime: Util.RuntimeOptions): ApplyAuthorizationResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('ApplyAuthorization', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function applyAuthorization(request: ApplyAuthorizationRequest): ApplyAuthorizationResponse { var runtime = new Util.RuntimeOptions{}; return applyAuthorizationWithOptions(request, runtime); } model PutAlertSettingListRequest { contactIdsJson?: string(name='ContactIdsJson'), contactGroupIdsJson?: string(name='ContactGroupIdsJson'), alertSettingEditRequestListJson?: string(name='AlertSettingEditRequestListJson'), } model PutAlertSettingListResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: boolean(name='Data'), } model PutAlertSettingListResponse = { headers: map[string]string(name='headers'), body: PutAlertSettingListResponseBody(name='body'), } async function putAlertSettingListWithOptions(request: PutAlertSettingListRequest, runtime: Util.RuntimeOptions): PutAlertSettingListResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('PutAlertSettingList', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function putAlertSettingList(request: PutAlertSettingListRequest): PutAlertSettingListResponse { var runtime = new Util.RuntimeOptions{}; return putAlertSettingListWithOptions(request, runtime); } model ListSlsReportsRequest { productCode?: string(name='ProductCode'), logStore?: string(name='LogStore'), severity?: string(name='Severity'), instanceId?: string(name='InstanceId'), uid?: long(name='Uid'), currentPage?: int32(name='CurrentPage'), pageSize?: int32(name='PageSize'), } model ListSlsReportsResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), status?: string(name='Status'), message?: string(name='Message'), code?: int32(name='Code'), data?: [ map[string]any ](name='Data'), pageTotal?: long(name='PageTotal'), } model ListSlsReportsResponse = { headers: map[string]string(name='headers'), body: ListSlsReportsResponseBody(name='body'), } async function listSlsReportsWithOptions(request: ListSlsReportsRequest, runtime: Util.RuntimeOptions): ListSlsReportsResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('ListSlsReports', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function listSlsReports(request: ListSlsReportsRequest): ListSlsReportsResponse { var runtime = new Util.RuntimeOptions{}; return listSlsReportsWithOptions(request, runtime); } model DescribeAlertContactRequest { currentPage?: int32(name='CurrentPage'), pageSize?: int32(name='PageSize'), searchLike?: string(name='SearchLike'), searchBy?: string(name='SearchBy'), operaUid?: string(name='OperaUid'), } model DescribeAlertContactResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), total?: long(name='Total'), data?: [ { email?: string(name='email'), gmtCreate?: long(name='gmtCreate'), gmtModified?: long(name='gmtModified'), groupNames?: string(name='groupNames'), id?: long(name='id'), name?: string(name='name'), phone?: string(name='phone'), uid?: long(name='uid'), webhook?: string(name='webhook'), } ](name='Data'), } model DescribeAlertContactResponse = { headers: map[string]string(name='headers'), body: DescribeAlertContactResponseBody(name='body'), } async function describeAlertContactWithOptions(request: DescribeAlertContactRequest, runtime: Util.RuntimeOptions): DescribeAlertContactResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeAlertContact', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeAlertContact(request: DescribeAlertContactRequest): DescribeAlertContactResponse { var runtime = new Util.RuntimeOptions{}; return describeAlertContactWithOptions(request, runtime); } model CreateAlertContactRequest { email?: string(name='Email'), phone?: string(name='Phone'), webhook?: string(name='Webhook'), name?: string(name='Name'), operaUid?: string(name='OperaUid'), } model CreateAlertContactResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: boolean(name='Data'), } model CreateAlertContactResponse = { headers: map[string]string(name='headers'), body: CreateAlertContactResponseBody(name='body'), } async function createAlertContactWithOptions(request: CreateAlertContactRequest, runtime: Util.RuntimeOptions): CreateAlertContactResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('CreateAlertContact', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function createAlertContact(request: CreateAlertContactRequest): CreateAlertContactResponse { var runtime = new Util.RuntimeOptions{}; return createAlertContactWithOptions(request, runtime); } model PutDiagInfoRequest { uid?: long(name='Uid'), starttime?: long(name='Starttime'), endtime?: long(name='Endtime'), diagInfo?: string(name='DiagInfo'), } model PutDiagInfoResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), msg?: string(name='Msg'), status?: string(name='Status'), data?: map[string]any(name='Data'), } model PutDiagInfoResponse = { headers: map[string]string(name='headers'), body: PutDiagInfoResponseBody(name='body'), } async function putDiagInfoWithOptions(request: PutDiagInfoRequest, runtime: Util.RuntimeOptions): PutDiagInfoResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('PutDiagInfo', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function putDiagInfo(request: PutDiagInfoRequest): PutDiagInfoResponse { var runtime = new Util.RuntimeOptions{}; return putDiagInfoWithOptions(request, runtime); } model GetBusinessGroupOverviewListRequest { aliUid?: string(name='AliUid'), currentPage?: int32(name='CurrentPage'), pageSize?: int32(name='PageSize'), operaUid?: string(name='OperaUid'), } model GetBusinessGroupOverviewListResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), status?: boolean(name='Status'), msg?: string(name='Msg'), data?: map[string]any(name='Data'), pageTotal?: int32(name='PageTotal'), } model GetBusinessGroupOverviewListResponse = { headers: map[string]string(name='headers'), body: GetBusinessGroupOverviewListResponseBody(name='body'), } async function getBusinessGroupOverviewListWithOptions(request: GetBusinessGroupOverviewListRequest, runtime: Util.RuntimeOptions): GetBusinessGroupOverviewListResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetBusinessGroupOverviewList', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getBusinessGroupOverviewList(request: GetBusinessGroupOverviewListRequest): GetBusinessGroupOverviewListResponse { var runtime = new Util.RuntimeOptions{}; return getBusinessGroupOverviewListWithOptions(request, runtime); } model CreateDumpRequest { eventId?: string(name='EventId'), instanceId?: string(name='InstanceId'), } model CreateDumpResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), status?: boolean(name='Status'), message?: string(name='Message'), data?: map[string]any(name='Data'), } model CreateDumpResponse = { headers: map[string]string(name='headers'), body: CreateDumpResponseBody(name='body'), } async function createDumpWithOptions(request: CreateDumpRequest, runtime: Util.RuntimeOptions): CreateDumpResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('CreateDump', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function createDump(request: CreateDumpRequest): CreateDumpResponse { var runtime = new Util.RuntimeOptions{}; return createDumpWithOptions(request, runtime); } model IgnoreAlarmsRequest { alarmId?: string(name='AlarmId'), } model IgnoreAlarmsResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: string(name='Code'), status?: string(name='Status'), message?: string(name='Message'), data?: boolean(name='Data'), } model IgnoreAlarmsResponse = { headers: map[string]string(name='headers'), body: IgnoreAlarmsResponseBody(name='body'), } async function ignoreAlarmsWithOptions(request: IgnoreAlarmsRequest, runtime: Util.RuntimeOptions): IgnoreAlarmsResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('IgnoreAlarms', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function ignoreAlarms(request: IgnoreAlarmsRequest): IgnoreAlarmsResponse { var runtime = new Util.RuntimeOptions{}; return ignoreAlarmsWithOptions(request, runtime); } model DescribeAllBusinessGroupInfoRequest { operaUid?: string(name='OperaUid'), } model DescribeAllBusinessGroupInfoResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: [ { businessGroupId?: string(name='BusinessGroupId'), businessGroupName?: string(name='BusinessGroupName'), } ](name='Data'), } model DescribeAllBusinessGroupInfoResponse = { headers: map[string]string(name='headers'), body: DescribeAllBusinessGroupInfoResponseBody(name='body'), } async function describeAllBusinessGroupInfoWithOptions(request: DescribeAllBusinessGroupInfoRequest, runtime: Util.RuntimeOptions): DescribeAllBusinessGroupInfoResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeAllBusinessGroupInfo', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeAllBusinessGroupInfo(request: DescribeAllBusinessGroupInfoRequest): DescribeAllBusinessGroupInfoResponse { var runtime = new Util.RuntimeOptions{}; return describeAllBusinessGroupInfoWithOptions(request, runtime); } model CountLatestReportsRequest { productCode?: string(name='ProductCode'), logStore?: string(name='LogStore'), uid?: long(name='Uid'), } model CountLatestReportsResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), status?: string(name='Status'), message?: string(name='Message'), code?: int32(name='Code'), data?: map[string]any(name='Data'), } model CountLatestReportsResponse = { headers: map[string]string(name='headers'), body: CountLatestReportsResponseBody(name='body'), } async function countLatestReportsWithOptions(request: CountLatestReportsRequest, runtime: Util.RuntimeOptions): CountLatestReportsResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('CountLatestReports', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function countLatestReports(request: CountLatestReportsRequest): CountLatestReportsResponse { var runtime = new Util.RuntimeOptions{}; return countLatestReportsWithOptions(request, runtime); } model DescribeRiskRequest { startTime?: long(name='StartTime'), endTime?: long(name='EndTime'), types?: string(name='Types'), uid?: long(name='Uid'), } model DescribeRiskResponseBody = { status?: string(name='Status'), code?: string(name='Code'), riskAssessment?: map[string]any(name='RiskAssessment'), message?: string(name='Message'), requestId?: string(name='RequestId'), } model DescribeRiskResponse = { headers: map[string]string(name='headers'), body: DescribeRiskResponseBody(name='body'), } async function describeRiskWithOptions(request: DescribeRiskRequest, runtime: Util.RuntimeOptions): DescribeRiskResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeRisk', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeRisk(request: DescribeRiskRequest): DescribeRiskResponse { var runtime = new Util.RuntimeOptions{}; return describeRiskWithOptions(request, runtime); } model ListReportsRequest { currentPage?: int32(name='CurrentPage'), pageSize?: int32(name='PageSize'), uid?: long(name='Uid'), } model ListReportsResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), status?: string(name='Status'), message?: string(name='Message'), code?: int32(name='Code'), pageTotal?: long(name='PageTotal'), data?: [ { bid?: string(name='bid'), cid?: long(name='cid'), costCount?: long(name='costCount'), costCountTrendJson?: string(name='costCountTrendJson'), criticalCount?: long(name='criticalCount'), criticalCountTrendJson?: string(name='criticalCountTrendJson'), customerName?: string(name='customerName'), gcLevel?: string(name='gcLevel'), gmtCreate?: long(name='gmtCreate'), gmtModified?: long(name='gmtModified'), id?: long(name='id'), normalCount?: long(name='normalCount'), normalCountTrendJson?: string(name='normalCountTrendJson'), score?: long(name='score'), scoreTrendJson?: string(name='scoreTrendJson'), trendJson?: string(name='trendJson'), uid?: long(name='uid'), warningCount?: long(name='warningCount'), warningCountTrendJson?: string(name='warningCountTrendJson'), } ](name='Data'), } model ListReportsResponse = { headers: map[string]string(name='headers'), body: ListReportsResponseBody(name='body'), } async function listReportsWithOptions(request: ListReportsRequest, runtime: Util.RuntimeOptions): ListReportsResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('ListReports', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function listReports(request: ListReportsRequest): ListReportsResponse { var runtime = new Util.RuntimeOptions{}; return listReportsWithOptions(request, runtime); } model GetAiopsEventNewListRequest { uid?: long(name='Uid'), currentPage?: int32(name='CurrentPage'), pageSize?: int32(name='PageSize'), operaUid?: string(name='OperaUid'), } model GetAiopsEventNewListResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), status?: string(name='Status'), msg?: string(name='Msg'), data?: map[string]any(name='Data'), pageTotal?: long(name='PageTotal'), } model GetAiopsEventNewListResponse = { headers: map[string]string(name='headers'), body: GetAiopsEventNewListResponseBody(name='body'), } async function getAiopsEventNewListWithOptions(request: GetAiopsEventNewListRequest, runtime: Util.RuntimeOptions): GetAiopsEventNewListResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetAiopsEventNewList', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getAiopsEventNewList(request: GetAiopsEventNewListRequest): GetAiopsEventNewListResponse { var runtime = new Util.RuntimeOptions{}; return getAiopsEventNewListWithOptions(request, runtime); } model GetEventDetailRequest { id?: long(name='Id'), eventId?: string(name='EventId'), operaUid?: string(name='OperaUid'), } model GetEventDetailResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), msg?: string(name='Msg'), status?: string(name='Status'), data?: map[string]any(name='Data'), } model GetEventDetailResponse = { headers: map[string]string(name='headers'), body: GetEventDetailResponseBody(name='body'), } async function getEventDetailWithOptions(request: GetEventDetailRequest, runtime: Util.RuntimeOptions): GetEventDetailResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetEventDetail', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getEventDetail(request: GetEventDetailRequest): GetEventDetailResponse { var runtime = new Util.RuntimeOptions{}; return getEventDetailWithOptions(request, runtime); } model PutAlertContactToGroupRequest { contactIdListJson?: string(name='ContactIdListJson'), groupId?: long(name='GroupId'), groupIdListJson?: string(name='GroupIdListJson'), } model PutAlertContactToGroupResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: boolean(name='Data'), } model PutAlertContactToGroupResponse = { headers: map[string]string(name='headers'), body: PutAlertContactToGroupResponseBody(name='body'), } async function putAlertContactToGroupWithOptions(request: PutAlertContactToGroupRequest, runtime: Util.RuntimeOptions): PutAlertContactToGroupResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('PutAlertContactToGroup', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function putAlertContactToGroup(request: PutAlertContactToGroupRequest): PutAlertContactToGroupResponse { var runtime = new Util.RuntimeOptions{}; return putAlertContactToGroupWithOptions(request, runtime); } model GetRootCauseRequest { eventId?: string(name='EventId'), rootCauseId?: string(name='RootCauseId'), instanceId?: string(name='InstanceId'), } model GetRootCauseResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), status?: string(name='Status'), message?: string(name='Message'), data?: map[string]any(name='Data'), } model GetRootCauseResponse = { headers: map[string]string(name='headers'), body: GetRootCauseResponseBody(name='body'), } async function getRootCauseWithOptions(request: GetRootCauseRequest, runtime: Util.RuntimeOptions): GetRootCauseResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetRootCause', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getRootCause(request: GetRootCauseRequest): GetRootCauseResponse { var runtime = new Util.RuntimeOptions{}; return getRootCauseWithOptions(request, runtime); } model DescribeAllAlertContactRequest { operaUid?: string(name='OperaUid'), } model DescribeAllAlertContactResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: [ { email?: string(name='email'), gmtCreate?: long(name='gmtCreate'), gmtModified?: long(name='gmtModified'), groupNames?: string(name='groupNames'), id?: long(name='id'), name?: string(name='name'), phone?: string(name='phone'), uid?: long(name='uid'), webhook?: string(name='webhook'), } ](name='Data'), } model DescribeAllAlertContactResponse = { headers: map[string]string(name='headers'), body: DescribeAllAlertContactResponseBody(name='body'), } async function describeAllAlertContactWithOptions(request: DescribeAllAlertContactRequest, runtime: Util.RuntimeOptions): DescribeAllAlertContactResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeAllAlertContact', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeAllAlertContact(request: DescribeAllAlertContactRequest): DescribeAllAlertContactResponse { var runtime = new Util.RuntimeOptions{}; return describeAllAlertContactWithOptions(request, runtime); } model UpdateAuthorizationRequest { userId?: string(name='UserId'), type?: string(name='Type'), } model UpdateAuthorizationResponseBody = { status?: string(name='Status'), message?: string(name='Message'), requestId?: string(name='RequestId'), data?: string(name='Data'), code?: string(name='Code'), } model UpdateAuthorizationResponse = { headers: map[string]string(name='headers'), body: UpdateAuthorizationResponseBody(name='body'), } async function updateAuthorizationWithOptions(request: UpdateAuthorizationRequest, runtime: Util.RuntimeOptions): UpdateAuthorizationResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('UpdateAuthorization', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function updateAuthorization(request: UpdateAuthorizationRequest): UpdateAuthorizationResponse { var runtime = new Util.RuntimeOptions{}; return updateAuthorizationWithOptions(request, runtime); } model DescribeAlertContactWithAlertSettingIdRequest { contactType?: long(name='ContactType'), alertSettingId?: long(name='AlertSettingId'), } model DescribeAlertContactWithAlertSettingIdResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: [ { contactId?: long(name='contactId'), contactName?: string(name='contactName'), contactType?: long(name='contactType'), } ](name='Data'), } model DescribeAlertContactWithAlertSettingIdResponse = { headers: map[string]string(name='headers'), body: DescribeAlertContactWithAlertSettingIdResponseBody(name='body'), } async function describeAlertContactWithAlertSettingIdWithOptions(request: DescribeAlertContactWithAlertSettingIdRequest, runtime: Util.RuntimeOptions): DescribeAlertContactWithAlertSettingIdResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeAlertContactWithAlertSettingId', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeAlertContactWithAlertSettingId(request: DescribeAlertContactWithAlertSettingIdRequest): DescribeAlertContactWithAlertSettingIdResponse { var runtime = new Util.RuntimeOptions{}; return describeAlertContactWithAlertSettingIdWithOptions(request, runtime); } model GetAuthorizationRequest { userId?: string(name='UserId'), } model GetAuthorizationResponseBody = { status?: string(name='Status'), message?: string(name='Message'), requestId?: string(name='RequestId'), data?: boolean(name='Data'), code?: string(name='Code'), } model GetAuthorizationResponse = { headers: map[string]string(name='headers'), body: GetAuthorizationResponseBody(name='body'), } async function getAuthorizationWithOptions(request: GetAuthorizationRequest, runtime: Util.RuntimeOptions): GetAuthorizationResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetAuthorization', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getAuthorization(request: GetAuthorizationRequest): GetAuthorizationResponse { var runtime = new Util.RuntimeOptions{}; return getAuthorizationWithOptions(request, runtime); } model GetRoleResponseBody = { message?: string(name='Message'), requestId?: string(name='RequestId'), staus?: string(name='Staus'), data?: boolean(name='Data'), code?: int32(name='Code'), } model GetRoleResponse = { headers: map[string]string(name='headers'), body: GetRoleResponseBody(name='body'), } async function getRoleWithOptions(runtime: Util.RuntimeOptions): GetRoleResponse { var req = new OpenApi.OpenApiRequest{}; return doRPCRequest('GetRole', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getRole(): GetRoleResponse { var runtime = new Util.RuntimeOptions{}; return getRoleWithOptions(runtime); } model ListRootCauseRequest { eventId?: string(name='EventId'), rootCauseId?: string(name='RootCauseId'), instanceId?: string(name='InstanceId'), } model ListRootCauseResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), status?: string(name='Status'), message?: string(name='Message'), data?: map[string]any(name='Data'), } model ListRootCauseResponse = { headers: map[string]string(name='headers'), body: ListRootCauseResponseBody(name='body'), } async function listRootCauseWithOptions(request: ListRootCauseRequest, runtime: Util.RuntimeOptions): ListRootCauseResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('ListRootCause', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function listRootCause(request: ListRootCauseRequest): ListRootCauseResponse { var runtime = new Util.RuntimeOptions{}; return listRootCauseWithOptions(request, runtime); } model DescribeAlertContactWithGroupIdRequest { groupId?: long(name='GroupId'), } model DescribeAlertContactWithGroupIdResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: [ { email?: string(name='email'), gmtCreate?: long(name='gmtCreate'), gmtModified?: long(name='gmtModified'), id?: long(name='id'), name?: string(name='name'), phone?: string(name='phone'), uid?: long(name='uid'), webhook?: string(name='webhook'), } ](name='Data'), } model DescribeAlertContactWithGroupIdResponse = { headers: map[string]string(name='headers'), body: DescribeAlertContactWithGroupIdResponseBody(name='body'), } async function describeAlertContactWithGroupIdWithOptions(request: DescribeAlertContactWithGroupIdRequest, runtime: Util.RuntimeOptions): DescribeAlertContactWithGroupIdResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeAlertContactWithGroupId', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeAlertContactWithGroupId(request: DescribeAlertContactWithGroupIdRequest): DescribeAlertContactWithGroupIdResponse { var runtime = new Util.RuntimeOptions{}; return describeAlertContactWithGroupIdWithOptions(request, runtime); } model DeleteAlertSettingListRequest { customerIdsJson?: string(name='CustomerIdsJson'), } model DeleteAlertSettingListResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: boolean(name='Data'), } model DeleteAlertSettingListResponse = { headers: map[string]string(name='headers'), body: DeleteAlertSettingListResponseBody(name='body'), } async function deleteAlertSettingListWithOptions(request: DeleteAlertSettingListRequest, runtime: Util.RuntimeOptions): DeleteAlertSettingListResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DeleteAlertSettingList', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function deleteAlertSettingList(request: DeleteAlertSettingListRequest): DeleteAlertSettingListResponse { var runtime = new Util.RuntimeOptions{}; return deleteAlertSettingListWithOptions(request, runtime); } model GetTrendSlsReportsRequest { productCode?: string(name='ProductCode'), uid?: long(name='Uid'), instanceId?: string(name='InstanceId'), severity?: string(name='Severity'), } model GetTrendSlsReportsResponseBody = { status?: string(name='Status'), message?: string(name='Message'), code?: int32(name='Code'), data?: map[string]any(name='Data'), requestId?: string(name='RequestId'), } model GetTrendSlsReportsResponse = { headers: map[string]string(name='headers'), body: GetTrendSlsReportsResponseBody(name='body'), } async function getTrendSlsReportsWithOptions(request: GetTrendSlsReportsRequest, runtime: Util.RuntimeOptions): GetTrendSlsReportsResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetTrendSlsReports', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getTrendSlsReports(request: GetTrendSlsReportsRequest): GetTrendSlsReportsResponse { var runtime = new Util.RuntimeOptions{}; return getTrendSlsReportsWithOptions(request, runtime); } model ListEventRequest { uid?: long(name='Uid'), currentPage?: int32(name='CurrentPage'), pageSize?: int32(name='PageSize'), } model ListEventResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: long(name='Code'), message?: string(name='Message'), status?: string(name='Status'), list?: [ map[string]any ](name='List'), pageTotal?: long(name='PageTotal'), } model ListEventResponse = { headers: map[string]string(name='headers'), body: ListEventResponseBody(name='body'), } async function listEventWithOptions(request: ListEventRequest, runtime: Util.RuntimeOptions): ListEventResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('ListEvent', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function listEvent(request: ListEventRequest): ListEventResponse { var runtime = new Util.RuntimeOptions{}; return listEventWithOptions(request, runtime); } model GetDiagInfoRequest { uid?: long(name='Uid'), starttime?: long(name='Starttime'), endtime?: long(name='Endtime'), diagnosticId?: string(name='DiagnosticId'), status?: string(name='Status'), currentPage?: int32(name='CurrentPage'), pageSize?: int32(name='PageSize'), } model GetDiagInfoResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), msg?: string(name='Msg'), status?: string(name='Status'), data?: map[string]any(name='Data'), pageTotal?: long(name='PageTotal'), } model GetDiagInfoResponse = { headers: map[string]string(name='headers'), body: GetDiagInfoResponseBody(name='body'), } async function getDiagInfoWithOptions(request: GetDiagInfoRequest, runtime: Util.RuntimeOptions): GetDiagInfoResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetDiagInfo', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getDiagInfo(request: GetDiagInfoRequest): GetDiagInfoResponse { var runtime = new Util.RuntimeOptions{}; return getDiagInfoWithOptions(request, runtime); } model DescribeInvocationResultsRequest { regionId?: string(name='RegionId'), invokeId?: string(name='InvokeId'), instanceId?: string(name='InstanceId'), commandId?: string(name='CommandId'), } model DescribeInvocationResultsResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), status?: boolean(name='Status'), message?: string(name='Message'), data?: map[string]any(name='Data'), } model DescribeInvocationResultsResponse = { headers: map[string]string(name='headers'), body: DescribeInvocationResultsResponseBody(name='body'), } async function describeInvocationResultsWithOptions(request: DescribeInvocationResultsRequest, runtime: Util.RuntimeOptions): DescribeInvocationResultsResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeInvocationResults', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeInvocationResults(request: DescribeInvocationResultsRequest): DescribeInvocationResultsResponse { var runtime = new Util.RuntimeOptions{}; return describeInvocationResultsWithOptions(request, runtime); } model GetEventTrentRequest { uid?: long(name='Uid'), startTime?: string(name='StartTime'), endTime?: string(name='EndTime'), timeType?: string(name='TimeType'), granularityType?: string(name='GranularityType'), operaUid?: string(name='OperaUid'), } model GetEventTrentResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), status?: string(name='Status'), msg?: string(name='Msg'), data?: map[string]any(name='Data'), pageTotal?: long(name='PageTotal'), } model GetEventTrentResponse = { headers: map[string]string(name='headers'), body: GetEventTrentResponseBody(name='body'), } async function getEventTrentWithOptions(request: GetEventTrentRequest, runtime: Util.RuntimeOptions): GetEventTrentResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('GetEventTrent', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function getEventTrent(request: GetEventTrentRequest): GetEventTrentResponse { var runtime = new Util.RuntimeOptions{}; return getEventTrentWithOptions(request, runtime); } model ListApplyAuthorizationResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), list?: map[string]any(name='List'), } model ListApplyAuthorizationResponse = { headers: map[string]string(name='headers'), body: ListApplyAuthorizationResponseBody(name='body'), } async function listApplyAuthorizationWithOptions(runtime: Util.RuntimeOptions): ListApplyAuthorizationResponse { var req = new OpenApi.OpenApiRequest{}; return doRPCRequest('ListApplyAuthorization', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function listApplyAuthorization(): ListApplyAuthorizationResponse { var runtime = new Util.RuntimeOptions{}; return listApplyAuthorizationWithOptions(runtime); } model DescribeAlertSettingRequest { pageSize?: long(name='PageSize'), currentPage?: long(name='CurrentPage'), customerName?: string(name='CustomerName', description='废弃'), uid?: long(name='Uid', description='废弃'), searchKeyword?: string(name='SearchKeyword'), settingStatus?: string(name='SettingStatus'), operaUid?: string(name='OperaUid'), } model DescribeAlertSettingResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), total?: int32(name='Total'), data?: [ { alertName?: string(name='AlertName'), alertSettingId?: long(name='AlertSettingId'), businessGroupIds?: string(name='BusinessGroupIds'), businessGroupNames?: string(name='BusinessGroupNames'), contactIds?: string(name='ContactIds'), contactNames?: string(name='ContactNames'), sendDingtalkNotice?: boolean(name='SendDingtalkNotice'), sendEmailNotice?: boolean(name='SendEmailNotice'), sendSmsNotice?: boolean(name='SendSmsNotice'), settingStatus?: long(name='SettingStatus'), stopDuration?: long(name='StopDuration'), totalBusinessResourceNumber?: long(name='TotalBusinessResourceNumber'), } ](name='Data'), } model DescribeAlertSettingResponse = { headers: map[string]string(name='headers'), body: DescribeAlertSettingResponseBody(name='body'), } async function describeAlertSettingWithOptions(request: DescribeAlertSettingRequest, runtime: Util.RuntimeOptions): DescribeAlertSettingResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('DescribeAlertSetting', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function describeAlertSetting(request: DescribeAlertSettingRequest): DescribeAlertSettingResponse { var runtime = new Util.RuntimeOptions{}; return describeAlertSettingWithOptions(request, runtime); } model UpdBusinessGroupRequest { businessGroupId?: string(name='BusinessGroupId'), aliUid?: string(name='AliUid'), businessGroupName?: string(name='BusinessGroupName'), businessGroupDesc?: string(name='BusinessGroupDesc'), resourceType?: int32(name='ResourceType'), updateUser?: string(name='UpdateUser'), instanceList?: [ string ](name='InstanceList'), cloudResourceTypeId?: string(name='CloudResourceTypeId'), dealType?: int32(name='DealType'), operaUid?: string(name='OperaUid'), } model UpdBusinessGroupShrinkRequest { businessGroupId?: string(name='BusinessGroupId'), aliUid?: string(name='AliUid'), businessGroupName?: string(name='BusinessGroupName'), businessGroupDesc?: string(name='BusinessGroupDesc'), resourceType?: int32(name='ResourceType'), updateUser?: string(name='UpdateUser'), instanceListShrink?: string(name='InstanceList'), cloudResourceTypeId?: string(name='CloudResourceTypeId'), dealType?: int32(name='DealType'), operaUid?: string(name='OperaUid'), } model UpdBusinessGroupResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), msg?: string(name='Msg'), status?: string(name='Status'), } model UpdBusinessGroupResponse = { headers: map[string]string(name='headers'), body: UpdBusinessGroupResponseBody(name='body'), } async function updBusinessGroupWithOptions(tmpReq: UpdBusinessGroupRequest, runtime: Util.RuntimeOptions): UpdBusinessGroupResponse { Util.validateModel(tmpReq); var request = new UpdBusinessGroupShrinkRequest{}; OpenApiUtil.convert(tmpReq, request); if (!Util.isUnset(tmpReq.instanceList)) { request.instanceListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.instanceList, 'InstanceList', 'json'); } var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('UpdBusinessGroup', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function updBusinessGroup(request: UpdBusinessGroupRequest): UpdBusinessGroupResponse { var runtime = new Util.RuntimeOptions{}; return updBusinessGroupWithOptions(request, runtime); } model PutAlertContactRequest { email?: string(name='Email'), phone?: string(name='Phone'), webhook?: string(name='Webhook'), id?: long(name='Id'), name?: string(name='Name'), } model PutAlertContactResponseBody = { requestId?: string(name='RequestId', description='Id of the request'), code?: int32(name='Code'), message?: string(name='Message'), status?: string(name='Status'), data?: boolean(name='Data'), } model PutAlertContactResponse = { headers: map[string]string(name='headers'), body: PutAlertContactResponseBody(name='body'), } async function putAlertContactWithOptions(request: PutAlertContactRequest, runtime: Util.RuntimeOptions): PutAlertContactResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('PutAlertContact', '2020-08-06', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function putAlertContact(request: PutAlertContactRequest): PutAlertContactResponse { var runtime = new Util.RuntimeOptions{}; return putAlertContactWithOptions(request, runtime); }
Tea
5
aliyun/alibabacloud-sdk
aiops-20200806/main.tea
[ "Apache-2.0" ]
// Do not use this; it is only for an example in the docs contract MyToken { event Transfer(address indexed from, address indexed to, uint amount); mapping (address => uint256) _balances; constructor(uint256 totalSupply) { emit Transfer(address(0), msg.sender, totalSupply); _balances[msg.sender] = totalSupply; } // Read-Only Functions function balanceOf(address owner) public view returns (uint256) { return _balances[owner]; } function decimals() public pure returns (uint8) { return 18; } function symbol() public pure returns (string memory) { return "MyToken"; } // Authenticated Functions function transfer(address to, uint amount) public returns (bool) { require(_balances[msg.sender] >= amount, "insufficient token balance"); _balances[msg.sender] -= amount; _balances[to] += amount; emit Transfer(msg.sender, to, amount); return true; } }
Solidity
4
fusmanii/ethers.js
docs.wrm/api/contract/MyToken.sol
[ "MIT" ]
concrete QuestionNep of Question = CatNep ** open ResNep, Prelude in { flags optimize=all_subs ; coding = utf8; lin QuestCl cl = { s = \\t,p,qf => case qf of { QDir => cl.s ! t ! p ! OQuest; QIndir => "येदि" ++ cl.s ! t ! p ! ODir } } ; QuestVP qp vp = let cl = mkSClause ("") (Ag Masc qp.n Pers3_M) vp; -- Pers3_M qp1 = qp.s ! Nom; qp2 = qp.s ! Ins in { s = \\t,p,o => case t of { -- VPSmplPast => qp2 ++ cl.s ! t ! p ! ODir ; _ => qp1 ++ cl.s ! t ! p ! ODir } } ; QuestSlash ip slash = let ip1 = ip.s ! Nom; ip2 = ip.s ! Ins in { s = \\t,p,o => case t of { -- VPSmplPast => ip2 ++ slash.s ! t ! p ! ODir ; _ => ip2 ++ slash.s ! t ! p ! ODir } }; QuestIAdv iadv cl = { s = \\t,p,_ => iadv.s ++ cl.s ! t ! p ! ODir; } ; QuestIComp icomp np = let cl = mkSClause (np.s ! NPC Nom ++ icomp.s) np.a (predAux NonLiving) ;--(predAux np.t); to test mkQCl-IAdv-NP-QCl in { -- eg उनी कहाँ छिन् - (छिन् - NonLiving case) s = \\t,p,qf => case qf of { QDir => cl.s ! t ! p ! ODir; QIndir => cl.s ! t ! p ! ODir } }; PrepIP p ip = {s = ip.s ! ResNep.Nom ++ p.s } ; -- case need to be confirmed AdvIP ip adv = { s = \\c => adv.s ++ ip.s ! c ; n = ip.n; g = ip.g; } ; IdetCN idet cn = { s = \\c => idet.s ! Masc++ cn.s ! idet.n ! c ; n = idet.n; } ; IdetIP idet = { s = \\_ => idet.s ! Masc ; n = idet.n; } ; IdetQuant iqant num = { s =\\_ => iqant.s ! num.n ++ num.s ; n = num.n ; } ; CompIAdv a = a ; CompIP p = ss (p.s ! Nom) ; AdvIAdv i a = {s = i.s ++ a.s} ; AdvQVP vp iadv = insertObj (\\_ => iadv.s) vp ; AddAdvQVP qvp iadv = insertObj (\\_ => iadv.s) qvp ; ComplSlashIP vpslash ip = insertObj (\\_ => ip.s ! Nom) vpslash ; --QuestQVP : IP -> QVP -> QCl ; -- who buys what where QuestQVP ip qvp = let cl = mkSClause ("") (Ag Masc ip.n Pers3_M) qvp ; -- Pers3_M qp1 = ip.s ! Nom ; qp2 = ip.s ! Ins in { s = \\t,p,o => case t of { -- VPSmplPast => qp2 ++ cl.s ! t ! p ! ODir ; _ => qp1 ++ cl.s ! t ! p ! ODir } } ; lincat QVP = CatNep.VP ; }
Grammatical Framework
3
daherb/gf-rgl
src/nepali/QuestionNep.gf
[ "BSD-3-Clause" ]
PUT /q=08aP8931Ltyl9nqyJvjMaRCOgDV3uONtAdHABjoZUG6KAP6h3Vh97O3GJjjovXYgNdrhxc7TriXoAmeehZMJx88EyhcPXO0f09Nvd128SZnxZ2r5jFDELkn26reKRysODSLBZLfjU3vxLzLXKWeFOFJKcZYRH9V7hC98DDS4ZsS7weUksBuK6m86aLNHHHB0Xbyxv1TiDbOWYIzKxV0eZKyk0CaDLDiR0CRuMOf4rwBeuHoMrumzafrFI5iL72ANQZmOvKdk1qQeXkRqEG11YU0kF7f1hSlmgiIgg5maWiBsA9sAg36IIXZMWwJF63zpMgAyjTT8l4pQhSBfhY2xbGAWmLGpyd1rlBm0O5LCoKpnQuTACm2azi0x6a1Qbry9flQBO4jHge2dXiD1si6Gh5q8fZu8ZQ7LLWii2u4rGB7E4XlhnClrCHg5vJmjYf2AItYPA0ogsiIdEEQGpzMJPqrp8Icn5kAAimWF1aCYaDjcdSgWI48PnoxlzIHX50EPFcPOSLecjkstD9z66H554sUXfWn3Mk9lnOUlse6nx0u1YClFK4UFXp98ru9eBBr7pkAsfZ34yPskayGyXPPyzWyBfVd28UuvdEG47SMdyqEpX0rFdk67fAYij0PWMK79mDmGAS37O821o18XUbu0GQjsqAGVMN9LDIAliD9QqtlwdEnplKkUyyZ7GAFJCFffgzppU9CjA2FbPX6ZjTOi4sPoYEyhyeQKVqAe9keYeDpU2qDwq83XEDQUKvP0w48GyavSmdBcrMXjUsu0PfdYpSaKwarrUB3i93HgoQB3ZJIR4lW6iPRTmm28OEKq2MIJGAoTXxCZYM5UacRldlqQOj6JkYz6y7ppWOjJ9yiCUEenuvfcItgmw9HIgGA59JxO8NDLEZLSONfuIgiV7wjsJnxuTOlU4vkjV7fTuOeU91xez7UKhaTqqEW3XBUSLjhKi3IkZg7ukrGZTWPhijFv2EZwEWDAyLlHvZB4X738zGJUlEX1k52EHwrKVKdLfePcaOjAGKsongHBFYxYC8vBBLuKm9RWexKCT14M25pCGloJXZ4OpBRfDQA2kobLUcEXEpzqRBPGN2JdNSBOFlUtUxWKnnPBM6r9S356l3k1o9zTIPeoIitWRjASs4A0iwYc8p5vv5Kt8KtsmW7Xv8dlU8HbZHsy3LI7O9BpUH8cJubqdEhooKABkx71pdcsZGhZb6epyTiPyvOhdJ7tNtFy3KQOameqTgGyd53Z42eZ0AjaOEvnzermi2E0xo3MMHFhB74TFtNAI3ppxxyqknc1mzUqZ49Wi8YPBg9ids6IgZvddBQYvwEozkmyGAkatQtt9TD4LjU3TyyUlhNG21q7CzEEl8NNsVrV6QyHsfw7E5w7XcoT7OQkBYoZwHIAjfekehnpc2llRtRY5m43fPVasmsVazOR36DRSLZJPHAqUDO0LInu9mgP57Mnz9CgylEmdE2aaYs426rnTFR3G3CfjLofHfjaLOkAegr4W3jx6MNMMOMZw2u46YTCnlfbBK6ZA1UYeAH1DIQJykcSQESinC8HpYIJt9A8g7UT0awzRP1F9nHa3wDnaAHndQYKMrjzlWo8ejQ0XHWgHhqnWHgW4h9sOnJckH00CYK1fHUKASJ3D8kOKax6uplexfz6BCvAoL9zm5TjeB1yxrpLp9NjjTWSKG2HOZhPkGpdEqU4mjnN2AkUVACPGos5YLBmTnSrdOEGZJDlAvJOUt800Mu3BYc1MiDIB6LMSSV5RsIUDFOzNletGQoq4G3yHZmx78uEse5vUTPFF3KT8LCrssqdIU9H97Npgf6N5j8arQ7ykLzN459jJaUzpGIo6uowPnUSatDf9GAvAmWNvsVTz6bYiAV71C7QF0C7UolYIQY6DHJEHejgX2YMEovWNLPL50eeC51h4DdPNv5G4ZdNtQTRVybYBZMpetGDiFmXN0JKa1sKHOSZxdrhKjxDIhrYVyCcRUMQ0sjGGHFuOcRszr6E5igEMtsebHQ3KYiGd5B27LikpUHhk61rgZlulHdMoS6YgQs6SV6UMVNku6sCw529xhUciDwRMhsbAjDlahYbrGa3NryxyV5LrXONGGKCchCqv7vDMdAtPrVr8M2vL5MySQAC3g90iugGQcLH3hCf9f1Kn5X0hM4KZTfwOPJhlfJsMRNhssiDoXaycUvOUS58266yPDlitPIAzO03XClm4EDPXGIwcwiFr7FcDo3tQIMZVy87i48Zb80s3zAYRiBIS0vO3RKGx3OGN5zid2B7MfnfLzvpvgZoirHhAqXffnym5abpZNzGuo5GowTRA2Ptk4Ve2JFoHACWpD6HiGnRZ9QVOmPICoQrSUQw45Jlk9onKJz5Erhnx0943Uno6tMJ5jbrWBNiIO7i04xzRBgujeiAJvuQkVDX2QLKRxZ7s6rhdfOaq6R6uL108gEzzlXOLqTTJXgM63rcUWNbE7wsIXcCFSF59LLJ7G5Qea33suxdDX6DcK4a0VMZoxmWPtCi1dAT9ggJqc2Sh7mkAqizaB16RXZvSydchpdVj6s4qn4ivr0HKHdAstX0XZ0FFU6lOiNmU3vasMg2uaVG8tyuG8N8VsuXIOQs7xtFxDhilYb8MQ9vES9pWfWPSXFlJAq4XKPY8a0JOIx57EQuWHo3uWgRTIRThvZP9YYzSnjGIHwjS8JeppICHofADXZhJ0uDQaQs7MiXEALpGmT3W6w0G3tBdZcuTDkWx1HsT5jd9jQeJpgD2VxdKh8U4Q3vANTAuwBXLJ2P0stS8Q72JWgNPwKYTY9cPoaGZlUFGgVsq8CdEFH9yW0c27G5s5sfHsyep6t4VxIHHMOX2GmMRyGxDI33am1J7ZmJ1NyXiwkHxtPH5QBpU2PMu2Guf3xIxlk3snMkMAsGO0vYfqO9tdIgdxMYO3HZTYv99OXaHcNQ5u0pRZZyVrNOIPurkEOdJy0nowPemIgUuHWh8vQCuDZav1m35AOl6ftSFuChSm5KstEWnC7q8mJ0juJEBkCRmQphP3V1pqiDjz6YA90qEe7MA3nzT0nHG8A1hWlqcPVPNz4qWNF6Fq1ub4075aXO0H7Krb6rhWGb3ZRPjpb4BKN8jGFQrBUMZprtjAJ67BnfmYgE0mmGLV2QP10gYS1T06kBRyrtp7he6wsPiBPJ7wxPLHNUN2SGQHBTSKagndM99fuaga5Sw9OT8Fzdo7xUJXfhJ97gUnNDrknal0B00NMNvajZeQQTJyBsVSwBZtZ45ZCcq1idc7GWC0MITSk58cIVkSPXbrERUaygyY13dPeEVzjVi9aVJwUF6eJu1s8u3FCJqp2GoWIItwvZO69asX75fekFkmFpNavxM0X0dZC01TTPpV6E6PJoIfW8C06CKNHV7Gk2mkTWGSwUG4xD2L3G3XarodHDcmumFJX9Xviv0rvm38SCtin6OpjH8MHYDrj1OxTJbC2VclJxv73z2BDBquosKOik0fmgbPZN0FUTmjBEwHTvqd5QHTwb3nOpEz3X6YCF0lrcrQc0uhyr7gBGBs86nUBWFRp1LKjIRVTVXDipajqNDTQGNZtzvR9MUf1yJJV07inbrlPOENd7rHpKCrJtoZXOkDqInaIqoMCG3DVd353BGmZNJEKOa3DnL7fb9zwuHlvHAfCco7ZS4wAV87trWkp6skXux9v5WhkumbUyGq4ia6DM1PuqqnFfBTAWDzJsnggAJrzr8O7JbDtaXwcW9sqaOb0S6NvnUDZqiNdDQPMDOKvXRJJJQdf1FSrPCCSPEEWO1SeVwictj7rTbpWGRoukwhgJALys95pGGOQxCPzRGrtVFnGcsLN1CwI3wLbmDnNKUv3KpOLEOPRxQXeXuJRIiYCFum44c0wNr731DvHn3YEJMH4iwFONl1rolEL4w6KFUOCq7ekrE5iyUt1V32PNtuUshXRjOYjBval29JMH5GoqZlGhCczzHMA61cmuzqdFwiPCB9yzqvJTg8TqMNvwKJztFIQK4mc5Ev5rRVSozD796AVRKT8rZF39IA1kmCLdXqz7CCC8x4QjjDpxjKCXP5HkWf9mp2FNBjE3pAeaEc6Vk2ENLlW8WVCe08aP8931Ltyl9nqyJvjMaRCOgDV3uONtAdHABjoZUG6KAP6h3Vh97O3GJjjovXYgNdrhxc7TriXoAmeehZMJx88EyhcPXO0f09Nvd128SZnxZ2r5jFDELkn26reKRysODSLBZLfjU3vxLzLXKWeFOFJKcZYRH9V7hC98DDS4ZsS7weUksBuK6m86aLNHHHB0Xbyxv1TiDbOWYIzKxV0eZKyk0CaDLDiR0CRuMOf4rwBeuHoMrumzafrFI5iL72ANQZmOvKdk1qQeXkRqEG11YU0kF7f1hSlmgiIgg5maWiBsA9sAg36IIXZMWwJF63zpMgAyjTT8l4pQhSBfhY2xbGAWmLGpyd1rlBm0O5LCoKpnQuTACm2azi0x6a1Qbry9flQBO4jHge2dXiD1si6Gh5q8fZu8ZQ7LLWii2u4rGB7E4XlhnClrCHg5vJmjYf2AItYPA0ogsiIdEEQGpzMJPqrp8Icn5kAAimWF1aCYaDjcdSgWI48PnoxlzIHX50EPFcPOSLecjkstD9z66H554sUXfWn3Mk9lnOUlse6nx0u1YClFK4UFXp98ru9eBBr7pkAsfZ34yPskayGyXPPyzWyBfVd28UuvdEG47SMdyqEpX0rFdk67fAYij0PWMK79mDmGAS37O821o18XUbu0GQjsqAGVMN9LDIAliD9QqtlwdEnplKkUyyZ7GAFJCFffgzppU9CjA2FbPX6ZjTOi4sPoYEyhyeQKVqAe9keYeDpU2qDwq83XEDQUKvP0w48GyavSmdBcrMXjUsu0PfdYpSaKwarrUB3i93HgoQB3ZJIR4lW6iPRTmm28OEKq2MIJGAoTXxCZYM5UacRldlqQOj6JkYz6y7ppWOjJ9yiCUEenuvfcItgmw9HIgGA59JxO8NDLEZLSONfuIgiV7wjsJnxuTOlU4vkjV7fTuOeU91xez7UKhaTqqEW3XBUSLjhKi3IkZg7ukrGZTWPhijFv2EZwEWDAyLlHvZB4X738zGJUlEX1k52EHwrKVKdLfePcaOjAGKsongHBFYxYC8vBBLuKm9RWexKCT14M25pCGloJXZ4OpBRfDQA2kobLUcEXEpzqRBPGN2JdNSBOFlUtUxWKnnPBM6r9S356l3k1o9zTIPeoIitWRjASs4A0iwYc8p5vv5Kt8KtsmW7Xv8dlU8HbZHsy3LI7O9BpUH8cJubqdEhooKABkx71pdcsZGhZb6epyTiPyvOhdJ7tNtFy3KQOameqTgGyd53Z42eZ0AjaOEvnzermi2E0xo3MMHFhB74TFtNAI3ppxxyqknc1mzUqZ49Wi8YPBg9ids6IgZvddBQYvwEozkmyGAkatQtt9TD4LjU3TyyUlhNG21q7CzEEl8NNsVrV6QyHsfw7E5w7XcoT7OQkBYoZwHIAjfekehnpc2llRtRY5m43fPVasmsVazOR36DRSLZJPHAqUDO0LInu9mgP57Mnz9CgylEmdE2aaYs426rnTFR3G3CfjLofHfjaLOkAegr4W3jx6MNMMOMZw2u46YTCnlfbBK6ZA1UYeAH1DIQJykcSQESinC8HpYIJt9A8g7UT0awzRP1F9nHa3wDnaAHndQYKMrjzlWo8ejQ0XHWgHhqnWHgW4h9sOnJckH00CYK1fHUKASJ3D8kOKax6uplexfz6BCvAoL9zm5TjeB1yxrpLp9NjjTWSKG2HOZhPkGpdEqU4mjnN2AkUVACPGos5YLBmTnSrdOEGZJDlAvJOUt800Mu3BYc1MiDIB6LMSSV5RsIUDFOzNletGQoq4G3yHZmx78uEse5vUTPFF3KT8LCrssqdIU9H97Npgf6N5j8arQ7ykLzN459jJaUzpGIo6uowPnUSatDf9GAvAmWNvsVTz6bYiAV71C7QF0C7UolYIQY6DHJEHejgX2YMEovWNLPL50eeC51h4DdPNv5G4ZdNtQTRVybYBZMpetGDiFmXN0JKa1sKHOSZxdrhKjxDIhrYVyCcRUMQ0sjGGHFuOcRszr6E5igEMtsebHQ3KYiGd5B27LikpUHhk61rgZlulHdMoS6YgQs6SV6UMVNku6sCw529xhUciDwRMhsbAjDlahYbrGa3NryxyV5LrXONGGKCchCqv7vDMdAtPrVr8M2vL5MySQAC3g90iugGQcLH3hCf9f1Kn5X0hM4KZTfwOPJhlfJsMRNhssiDoXaycUvOUS58266yPDlitPIAzO03XClm4EDPXGIwcwiFr7FcDo3tQIMZVy87i48Zb80s3zAYRiBIS0vO3RKGx3OGN5zid2B7MfnfLzvpvgZoirHhAqXffnym5abpZNzGuo5GowTRA2Ptk4Ve2JFoHACWpD6HiGnRZ9QVOmPICoQrSUQw45Jlk9onKJz5Erhnx0943Uno6tMJ5jbrWBNiIO7i04xzRBgujeiAJvuQkVDX2QLKRxZ7s6rhdfOaq6R6uL108gEzzlXOLqTTJXgM63rcUWNbE7wsIXcCFSF59LLJ7G5Qea33suxdDX6DcK4a0VMZoxmWPtCi1dAT9ggJqc2Sh7mkAqizaB16RXZvSydchpdVj6s4qn4ivr0HKHdAstX0XZ0FFU6lOiNmU3vasMg2uaVG8tyuG8N8VsuXIOQs7xtFxDhilYb8MQ9vES9pWfWPSXFlJAq4XKPY8a0JOIx57EQuWHo3uWgRTIRThvZP9YYzSnjGIHwjS8JeppICHofADXZhJ0uDQaQs7MiXEALpGmT3W6w0G3tBdZcuTDkWx1HsT5jd9jQeJpgD2VxdKh8U4Q3vANTAuwBXLJ2P0stS8Q72JWgNPwKYTY9cPoaGZlUFGgVsq8CdEFH9yW0c27G5s5sfHsyep6t4VxIHHMOX2GmMRyGxDI33am1J7ZmJ1NyXiwkHxtPH5QBpU2PMu2Guf3xIxlk3snMkMAsGO0vYfqO9tdIgdxMYO3HZTYv99OXaHcNQ5u0pRZZyVrNOIPurkEOdJy0nowPemIgUuHWh8vQCuDZav1m35AOl6ftSFuChSm5KstEWnC7q8mJ0juJEBkCRmQphP3V1pqiDjz6YA90qEe7MA3nzT0nHG8A1hWlqcPVPNz4qWNF6Fq1ub4075aXO0H7Krb6rhWGb3ZRPjpb4BKN8jGFQrBUMZprtjAJ67BnfmYgE0mmGLV2QP10gYS1T06kBRyrtp7he6wsPiBPJ7wxPLHNUN2SGQHBTSKagndM99fuaga5Sw9OT8Fzdo7xUJXfhJ97gUnNDrknal0B00NMNvajZeQQTJyBsVSwBZtZ45ZCcq1idc7GWC0MITSk58cIVkSPXbrERUaygyY13dPeEVzjVi9aVJwUF6eJu1s8u3FCJqp2GoWIItwvZO69asX75fekFkmFpNavxM0X0dZC01TTPpV6E6PJoIfW8C06CKNHV7Gk2mkTWGSwUG4xD2L3G3XarodHDcmumFJX9Xviv0rvm38SCtin6OpjH8MHYDrj1OxTJbC2VclJxv73z2BDBquosKOik0fmgbPZN0FUTmjBEwHTvqd5QHTwb3nOpEz3X6YCF0lrcrQc0uhyr7gBGBs86nUBWFRp1LKjIRVTVXDipajqNDTQGNZtzvR9MUf1yJJV07inbrlPOENd7rHpKCrJtoZXOkDqInaIqoMCG3DVd353BGmZNJEKOa3DnL7fb9zwuHlvHAfCco7ZS4wAV87trWkp6skXux9v5WhkumbUyGq4ia6DM1PuqqnFfBTAWDzJsnggAJrzr8O7JbDtaXwcW9sqaOb0S6NvnUDZqiNdDQPMDOKvXRJJJQdf1FSrPCCSPEEWO1SeVwictj7rTbpWGRoukwhgJALys95pGGOQxCPzRGrtVFnGcsLN1CwI3wLbmDnNKUv3KpOLEOPRxQXeXuJRIiYCFum44c0wNr731DvHn3YEJMH4iwFONl1rolEL4w6KFUOCq7ekrE5iyUt1V32PNtuUshXRjOYjBval29JMH5GoqZlGhCczzHMA61cmuzqdFwiPCB9yzqvJTg8TqMNvwKJztFIQK4mc5Ev5rRVSozD796AVRKT8rZF39IA1kmCLdXqz7CCC8x4QjjDpxjKCXP5HkWf9mp2FNjE62a HTTP/1.0\r\n Someheader: 0X0VfvRJPKiUBYDUS0Vbdm9Rv6pQ1giLdvXeG1SbOwwEjzKceTxd5RKlt9KHVdQkZPqnZ3jLsuj67otzLqX0Q1dY1EsBI1InsyGc2Dxdr5o7W5DsBGYV0SDMyta3V9bmBJXJQ6g8R9qPtNrED4eIPvVmFY7aokhFb4TILl5UnL8qI6qqiyniYDaPVMxDlZaoCNkDbukO34fOUJD6ZN541qmjWEq1rvtAYDI77mkzWSx5zOkYd62RFmY7YKrQC5gtIVq8SBLp09Ao53S3895ABRcxjrg99lfbgLQFYwbM4FQ6ab1Ll2uybZyEU8MHPt5Czst0cRsoG819SBphxygWcCNwB93KGLi1K9eiCuAgx6Ove165KObLrvfA1rDI5hiv83Gql0UohgKtHeRmtqM0McnCO1VWAnFxpi1hxIAlBrR4w35EcaryGEKKcL34QyzD1zlF4mkQkr1EAOTgIMKoLipGUgykz7UFN1cCuWyo3CkdZvukBS3IGtEfxFuFCcnp70WTIjZxXxU4owMbWW1ER5Gsx0ilET0mzekZL0ngCikNP2BRQikRdlVBQ3eiLzDjq27UAm7ufQ9MJla8Yxd6Ea37un9DMltQwGmnmeG5pET54STq72qfY4HCerWHbCX1qwHTErMfEfIWcYldDfytUTOj7NcWRga3xW7JYpPZHdlkb24evup3lI4arY6j5a12ZcX9zVI02IJG0QD9T4zSHEV0pdVFZ8xwOlSWKuZ9VZMmRyOwmfhIPA7fDV5SP8weRlSnSCSN4YBAfzFVNfPTyeoSfVpXsxIABhXEQTg12YvAAn9390wFhEhMsT9FWIiIs7oH63tQyjdEAZSJcZ0nSQfapvi4BDsQSMv3W2DofSzxwOPrVQWRMyvP0UV0J660Gc4iZ2Tixe3DSeqg9VuNvij09aCbkBdwJh9r4UWmM1Hp1ZDF5Rr14nKtFAgjVlGlfZi4bWQKTzOlqaVbWBvxdKsJ27eelyDnasIPqo17yY5lg10Lb8nyu60Wn7l7Xb0Ndp334B5am4Vh1foctvkkhNFeIejtnjPYmWjS77rJ1aL0zJka4Xog5Oparvc93Pddf9CzCxgle00BTKNj0syVo5uqvX5PVzdhAnigU4jdPbJbcPpbpJRU4UDqIswRNJOlGfpdLnCvnPIRB2a7btjFTaE0tne0TjedGbePje1Li21rPXPX7t5LICWl1SRyqQ9x9woGEv1sI5VgpRoKtS6oxWgMERjP3LcEez3XqLiSwv0rWMlDiJhxEopz8Mklx8ZygQLiwIYx2pNq0JhKB8K1lZ8dYE5d3nRWhXwG4gFTUg2JYjnjL81WGRmjXnZEVLwYfYBUkRlqWAYHi1E6wF85BfcwvkgnEeBTiQSlfu6xwCYaW2OEogq7tbdinvlpeEPij1qQivpcs573HPHpkXrEeXC9P2gZhmV1Rvn69NAN2lOXSVe8XotSyCG5fHFsTDYlOvYW8EBrAdWuZrwU753xwjk3QCp2ODetYze98voig4lfYHrrWT43VXcHt8J5z7U3kt5O460buwESBhgkALZdrFYyy4YQcmnAeSCw5OoLArDEmzaI4JkFBCDqQxTE9BTYA112r9ymuOo5MGkTDYZlvtvopG4ekorfLoIa13Z9L6ZilXT1cg55dvNlOrbTSHpQTYRJfJ6x71IpDFyvdbZbOHQYMm98fcN9CLqFErkpcN4JO26GIhSodGGTSnzyUxBYueawFNlGxCMTa6JseX9c7Xlo8NRaZHBPvG7Z4gUCkOdUSEW0RRTs3TSSdjEKnJ6u9RdDqqyvN8cJ7gliTd04mSyVnkmxdqVU8DrdIrkSCfVQNoFgdydDHS3wMLU6QGTGBzK5pd9EfsDEeYXtIb3CkRupM4SERGMTN8TyIxqqIyWmgjBmSGLTFOB5tsPhkVydVQNf7jBkDy6THfBy0uALVUkm2jLeTFXjajyeL4ms5Lgx0eLoz0XWN6WulXSA20zV3ObSCHbBeVUgKmPxHq5qPmAi04VFIvCOJ0rBQJh9ZHJMwvhI3VEBF6EmXOiRCn0XOhm3pfHlmaCAWrOSGuQs3NCNlFRjwmVRPY5FJrKYjH3FrLrLdU07zdViAix8C4LxVrRrMB6ligZC3CoDhFA4vMjiPU5SBRqRW4lwVnvMZEZbf0AYbBc2ymnKAOWbQwt2ldiI2qL0aLoL6YtSFUhpwMOR3LP1feUq6XRO5xc9V02nEt9MRQsl5MgmKMcXap4HqAN0yATpjAGRnWqEnE7E1XZg95cEl2gO4HXejKzR0kiTUudcw6P4t1RYLRx7isZNJxiq1JZz6FpEe7QhwGbhPySNMbXJtmYuhAaTpfGdGKMxvHHB9LmELOChdyfjHMwMZ2B0xgU2eJgJimCwLH3UEmExgAwJDD4GSCqevYAMK4P9FKPl0dku0KZ7uOJ8oNloEsrbvMuhuKFDuO1PNvxtdCcgASzNVzdueOtUm1giZIDqbb6j11nqi9NoFeck1zZi2kfGF7OeUp4vYszuhQNi4vd03QeVAduM9h9v36Nz1YobRxB2CjTp6qdKdW9IYBp8aExZpipnJIbfD2hTWE44kIu7Q17f4C9kycGjsLwAWkVbfTRmBMU8SbVKV1EJTrN1gGqGX7quSwg1Vp4qslKAk6EIkoReIl5DuzuH8Rbvrkp5LFFAhNhb1hvXvVWcibtDjQSradNtuYzGf2AAduhxOTnZjzbsceGYhQA5a5NtqxE2GBlW8CPoPzIyfMfPjdAIUmAcns7Fkp44nju2htwhryUyidEzDVyTwevquARjt5a7eu8qIKfPrYgbOAlPgA1JHNi55ivTNpDuQ8drNiafZIntA43HI447WtITYYvLxFRG8OWvJRwI0N7dvHYO8H8lYI1OwatfvLKlJqjtdJBBvMWXdT4SbxHUdNTDUQmqFGZaLx1AvYPnJTYRzrqn5ZnXyWQ1ZCwtvZK209TxoezJ2sGorE46C7Zyki6EcXlX2A8upUUh9IhqLYTzidIRrAPE5mZmosyDyShjnRiN5CLXZAI21eV4v3a6WXI8TKkUk3fhhajOgPXshlyCEfDAyESpz1J8RECu6vQs81E1ZNE5ha5UGw2wk3Ea8oSTfqTiu0OeisV2a6bfldvW4x0OL8PS57uuY0v0OZPSUPWmPQgnmJRVw8vmh62bpFekMnUH7y31fXU6MIyZaiBs1FEu7qF6irBszHt2ARy50SjgGwQZWcecgvB8gB874g3ES9mZer3diYGF3Wssmsm6XRdsNcuNn3yzuoi52cRrBYUOISegTBVApn4zfuCC9Y4AAfe6wmmiuN8hL6KJeOjrdK5EFQHGyrzeuIMaT3B2nKz1PNONVQ0udbqCQebz3cq7NPe6kGKFLiE6euWjdoMuAbuu8rTkAa42ensXz4a1Yo450ZVgYypaDtepDQWFkJyTHDW1HTVZfCok0tp7STRiQ8n3NKxOUSL9veuTsDs1FaV2rbzR3DvkEJrhJ10Rm0pvLgui5GUDKyWLnrqcNVtOIzFaj9K5pwMfnREm1VIs84ePX0GsMjirfOfubzDoYjavbiCtTB86nKx0tfCKtl0yUQ5PWSBqdGASY3mr5hZcFZ9bA6uXXGTNqMpUH3gqxCoF6t2yAim93t77jYkiFt3OBlBRVQzRsPbgEKRXbX3bWQj6NpDzNCQPYTs45HsQB967f4yByzLH8X289YAZJhJJyFTMCLbpdKFuMBX5Msyr4d15sBa1h5bI13dqU14WBnMKD12LkHMjHiyde6xf5EELf082sUfiAZaROFuDCDnA89p6y6oYEUgF1L9yQElZO4R6IrkJsEFN9hvARf3CH4ENqbYxtUN9gsB9CLCGKMy2R4wGKU3Dkyea27YCR4QHCdqX3HqOpy12uxBANvbrfEro9q5NJrGK7WVq3nNabN05x4TmIZk3asc8ehvDyhSgQLY0wwyvrkcYqNiETybJ57RjwVg1YE0IZEBfyAUNXE4goc2jtbZbHfcpTzt08pSJQZTAzuxrdQLS4EnaFHPpMdPh1YXUdclj6g2sjYbhoTYcV97bVDAUztMZ4EarUcv6tgQOvK66RmJCF2zVEpFDBS6AVZJWzrVlnuiweXpH0L9eY2Wy2EuAHi7gL4o0i0AkOapqY1TPUWUwBaVrKQzkL8QQbczgc97pMvSnGYMlcSdzlamFtUmRoOPmhBGMpVqmcxnstnqJ0TXMV65zbRN2hk3YVF5HwPjuWJmfkVYnyazuqKuaaohrQIe7YOOSAmD7C2vDnI50y1oScQqIPb87QAmguFz7jfNBSPymjPJ7UrToaJen7LEQr8S2b69ayZYNIyWbcpaW5ACUqdyT5AeHYhdENORnWS2B17qnBPtyvb4WujJCafLmsMFhQbcGonDZkHEOAnOcwRwJ4KIPr4MlQLRKsdnurPDDEmpCtCnFg8vPObOPHoHgICb9j35pG1YNhAAGIGTZ4g3JTJzFvTcW7GDRxREPZffKOuQTJoMYYaaPwnE0SainEpCFAukJbDy1ss5cZt60nqTw1asLzwMKJu5PHpU9sB9YN7J2cPhIbfb4387zSmSvqbt3I8NFjDbuYEhe6nZ7gRT5Th0W0MoyzHlmy4MSXbaAfUJNsLQJmdhdVKDsqMz0aXKIVNsXtn88owrhw0yqxU0K3IfTothafhpQ8daRUnbjzULViWRvUz7dI1N3GgylRzaEXQPgbj0DQ7RujNTcJoSp7I1ELjFFSBZDm4Jx5eXq0aS2SKJPFX7XmFfkkR99wRiHx4ByVTL5umojRhY5j8vg3l3yfliJbeOTXckaYiezrucuHaiVFWR2kjk9PUm57bDpvtSFMic652iDufj4hqpy5MH5r2lg67T6Bbb3fcq49cVJ3hkN2GfRqVhoPxmHyvotu5koheVh7oHDaLaf4VvcQMd5MF8sicaX3GXfoLjlfFZwfJBpXNbbVemD7XghpIEwuFjA1USU8yJnTdvCJ2bFmPNWFeWsBVDyl7XUsbgB3K2zz806xODZT639dqiqhGXQNbgYtShikQhiHhZF4wf4IY588LE4EO2bdXBb2Wezm8Gl2J5GAfqnx5Z6NF7h1gGkM27hpnmKNylKZjqTNANj0CRU4awpdVrYGX7hT0u452Y5bXpVl7cLuK7j2k7VG93NXPsXADhQA8R9WDcpU0PLzFWFq1omoQ9ZRSlvh8R4pRp4vHIYf4A5uQEmv5Owr4pFQcWdp5GAdkpBaSHvUhvMxOSpsqVB2LHvvs1RiOUHHhHdZEKpX25mK9moud8pKT4efru1SlRRSsxdz87hTJMUrueydHDPXbo9AvExctdqxuCk03Fy8cB57qrkQQ50oGNuTNPColMrwVfmuTt81uSZremLbINILnCVXEnvTugRQfFYMnprqMB4mVJfZfh6XVLdOyW4BPaFrBsZGFy7udoWJwE8ACx4UpJW6m1ltckofzA6AUxzXprXDCCL118m8bBB2hzDKmqeLk5ZYKsLROkTqRAxmJjBSZSo2XBroO5rVvkOZrOZRe8NgaHFMLPn0I6hsqwA7VdKlpbqknax84iWrtBe8ErxgPIQeYhELyK1deW1YWBagD21MBTc2h5LliIlglZg41H8Zl3GvUv0XNZegR5bx1kiM9WFGV9Yt37iQQGquWAMKCAb6AqpkCtKs7sXKaEAVsbh32tlkAg4ngspjwzYHTPYKUuigPX5K8siUfaAW9WJl7r8dc4ju97osWETOcBENLsfwB66TvsttORtOedylnErplZP3hjt7o39JllXDobj3l10bSr4B09eYVWi2DLGavYktKSKj1PrqzuGUaqcFxqoebpuDEAx5vl8ZmSYrmS2RBJ1n2s3lkKdaVWTmfIXlyMMT7Ac3lCXpGNnpf8ccTffv3E0fBrpCSpVc48dM5e5iTpRPrfWxAjrud9jSrqVBXsw3pqUvhuVmBpmwoKAfQGxHrauna3f48AFefGDozxXXjpdM9ZDWHsRUBTFNzDs8tUATtegSzZfNJCS9k0p5q2cueyU1mtwMJIdf0FrsVGiAyX7PFkWvLHi29fpprZQd0gbMMw2Bt10ZbZCsjPX261cXmVa6ZPnkVQm2w1ory3uWejuq20oQCyXTYyv1Ki4tbdPxoNn04Je7uS3QHDCsUl4i9zKNhBJ3g55bhIZWfwmLi3S7oY16gImdC6vvjsMKkCPzXv4pPaVhHH7o4f0mWEz30k4o7GQNOUy8LPM3NmlZF7QaIBdRfozG86jwQkC3jTNR357pdPjOqMERtIS4WEJBgbaeUCu5MOhsNdaD91iCeghIpOECFyTdEkUCGPPCIAtuAOKBdhPu40UxHx30dELMTK3azHOuOnLTsdiM4KJ9yF4Ab2eiz5j2T95sDx3aiEJDVDPCa55hO0XTBM9OSNtdzjdTdZT19XrwD0wPWZcBhfJ66X1uNM2eud1btzglqZP52qqYU7BK2M3BBZKKjy7P6YzmgaPHWnFGHZdwdz3Yq6e3N76Cjkfl8Sy0mkwd6pt0geDM1jNNZrcT8dUfLLaiUqcZm1KRVdpZaBrboDSuCxfWYlxqgsldwlGL4C06ceFUDXX8PzxzWEgOd8OU4F22pcNJOnwJGo6rYA3tvhAuq2WKVg6tgFCb1p7dzF4Ke3J0dv3IneMSNnHG4hkvxW6VzIykDUtYEjMQO35tdnEA0vMVLXIahpJpz4HGs5wwRgoZx1e1zD1pXi7KmEVTlfattgcGFlKjZJ60fEdloZEmiXodxT63CzuJHnjHDOL8qcMzTxHb8OCainga4w1fk4uILLAWqmTFpDcFGSF5lbOFUwhvtMK6knIWZ8ZApZvTGBt1qv3xKUJqPcWiweI4kk57zgyTPZku2mg4fJWDKSfiRSi7LvtpKkdqjein9lP7LMv5lKutprVzjmvHBPjunXGqakWx39xYH8RD6qF3Fw2BnIIesiicZsDv69Ggbu9Y334UeFPNIJ3LGp2I8xcUxlP5dJAh4V05p1HvIZ5Fhk0oCWlvNXdLqzbVsbfW9jWyQTaZXzw7WT3rqFQc7wvw4ayp5eKmUclqB1yOvrI14XGhmH7QMaAYNTIE2RHjYXVgvbmFRi0oB1v4nDEeSTn3KHBRQD8TilCagKg0XYPj2eAgWs12ZRYzlGyCvYZ1pol5wAwc9AFFGwsTJ9UYkbxlZv7wKDx7nFzlUSMC1kMvS2ECwvHzSycqHPRwCGipvG6kWz0mGvASXeKjm47iMROoY0MRK0uvgNdTTOTdxkMgOuCDIlxfit5QKjyzaVAg2kDwENfSd6XPMgSprTSLuNDXdg5NHCwUvDbEHVxpMgOItZymPZtPweOrnPdlEB4UwLZ8jqtShi5oDYvhkh85FwwT25OHFvDUWTTCV5n73pQ8kLo8zsB3mbWfGwg62guj3C50Dh42fAZEPBRSHDRTg3r0z39Vyj490lk2UpZeNyylwuEKmuIqEkbE3BRT2YEjTM8a2PU5grCuzculibcoRUpb1sIQiMRTf4wrtT1CnKcoUJ1T28DC04dTJVRcm3w3WzNLdrnovkX6NahblTzDvq5eXkoEaZv6HClmGuho4FH6s6i0OdmmW8qkNOnk7BhexiyAd3UYERlFwvZ6LP55tFOc3vnlhyylx1rTTgu1NFljRNs7rGiT7SnGFaFK7GITEZFEYI7DmOEUZXxDSHjYuOVN0YAJP2cZFgagyMwGJdrpH8S7cewYPMKz2Go2GBKl1OA6pJ8T91tUdEcGVg9JCMQUA4sBtlIuRTVV3cduIhsLCTi2ewItkh9MRP1kevVa9WcXejQQKreZmq5EZtzThW71r7E2tcvwFeqiwv3JZnV16bZ7NwZT6uvSrOnIFUyMsxhh8xCkVY82VLTAZhPXB8t6CbyjZ5stos6WmNZgoEsD8GU8pmzSTubAqQXkTbiODF2pePe6S9uQ9HngGGBnOjY4QUcAcScDsfflyXVqyxgTelGD4vXoba6qRWCqc9LKpyk4jCKYvLX9tzXusO7bhT2KRvF4MObDqdE4KnCCIF3zeVD0vImR20MmRTBHRCNm3s6GfyeTYEAlW3L2igZJ7Myj5zGLccMt2EohGc38HfWZ4mlvXRLHKB233PyKALYifqlAxTXaWUk13o6nACQDvN7DxSCA0daJeuznK1Dr52bC4IXCTahK1An6LkQMfsXb7Qus6ey241Vb4wTgFHqsdCx7qPxeAghmsTOHRVl\r\n \r\n
HTTP
0
ashishmjn/gunicorn
tests/requests/valid/024.http
[ "MIT" ]
// vim:syntax=javascript class Main extends MovieClip { var first : Boolean; var col_mc_1: Column; var col_mc_2: Column; function onLoad() { trace("onLoad"); first = true; // This column should be visible, see Column for scaling. attachMovie("column", "col_mc_1", getNextHighestDepth(), {_x:10}); // Both _width and _height should be 0. trace("col_mc_1 " + col_mc_1._width + "," + col_mc_1._height); // This column should not be visible due to passing _width here. attachMovie("column", "col_mc_2", getNextHighestDepth(), {_x:100, _width: 20}); // Both _width and _height should be 0. trace("col_mc_2 " + col_mc_2._width + "," + col_mc_2._height); } function onEnterFrame() { if (first) { first = false; trace("onEnterFrame"); trace("col1 " + col_mc_1._width + "," + col_mc_1._height); trace("col2 " + col_mc_2._width + "," + col_mc_2._height); } } }
ActionScript
3
Sprak1/ruffle
tests/tests/swfs/avm1/issue_2084/Main.as
[ "Apache-2.0", "Unlicense" ]
CREATE TABLE `tb_jhkrixchju` ( `col_prrcfbnwew` longtext, `col_peqguxwzcy` smallint(202) NOT NULL DEFAULT '1', `col_nhdlxtgtvs` char(1) CHARACTER SET utf8 DEFAULT NULL, `col_vyizooodsa` longblob, `col_hwmrzghead` longtext, `col_adgnavqmhq` longtext, `col_adwetrnlyu` bit(41) DEFAULT NULL, `col_ypyzwlctxm` varbinary(86) DEFAULT '\0', `col_rmjdxsrzry` char(159) DEFAULT NULL, `col_mcjrxquwtj` binary(1) DEFAULT NULL, `col_ilcapoaext` mediumblob, `col_dvcgmijmcd` smallint(246) unsigned NOT NULL DEFAULT '1', `col_avjufpxxft` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
SQL
2
yuanweikang2020/canal
parse/src/test/resources/ddl/alter/mysql_18.sql
[ "Apache-2.0" ]
// UNSUPPORTED: OS=windows-msvc // static library is not well supported yet on Windows // REQUIRES: lld_lto // For LTO, the linker dlopen()'s the libLTO library, which is a scenario that // ASan cannot work in ("Interceptors are not working, AddressSanitizer is // loaded too late"). // REQUIRES: no_asan // RUN: %empty-directory(%t) // RUN: %target-swiftc_driver -emit-library -static -lto=llvm-full %lto_flags -emit-module %S/Inputs/lto/module1.swift -working-directory %t // RUN: %target-swiftc_driver -lto=llvm-full %lto_flags %s -I%t -L%t -lmodule1 -module-name main -o %t/main // RUN: %llvm-nm --defined-only %t/main | %FileCheck %s // CHECK-NOT: _$s7module120unusedPublicFunctionyyF import module1
Swift
4
xjc90s/swift
test/Interpreter/llvm_link_time_opt.swift
[ "Apache-2.0" ]
*** Settings *** Library PositionalOnly.py Force Tags require-py3.8 *** Test Cases *** Normal usage ${result} = One argument arg Should be equal ${result} ARG ${result} = Three arguments 1 2 3 Should be equal ${result} 1-2-3 ${result} = With normal foo bar Should be equal ${result} foo-bar ${result} = With normal foo normal=bar Should be equal ${result} foo-bar Named syntax is not used ${result} = One argument what=ever Should be equal ${result} WHAT=EVER ${result} = One argument arg=arg Should be equal ${result} ARG=ARG ${result} = With normal posonly=foo bar Should be equal ${result} posonly=foo-bar ${result} = With normal posonly=foo normal=bar Should be equal ${result} posonly=foo-bar Default values ${result} = Defaults first Should be equal ${result} first-default ${result} = Defaults first second Should be equal ${result} first-second Type conversion ${result} = Types 1 2.5 Should be equal ${result} ${3.5} Too few arguments 1 [Documentation] FAIL Keyword 'PositionalOnly.Three Arguments' expected 3 arguments, got 2. Three arguments 1 2 Too few arguments 2 [Documentation] FAIL Keyword 'PositionalOnly.Defaults' expected 1 to 2 arguments, got 0. Defaults Too many arguments 1 [Documentation] FAIL Keyword 'PositionalOnly.One Argument' expected 1 argument, got 3. One argument too many args Too many arguments 2 [Documentation] FAIL Keyword 'PositionalOnly.With Normal' expected 2 arguments, got 3. With normal too many args Named argument syntax doesn't work after valid named arguments [Documentation] FAIL Keyword 'PositionalOnly.With Normal' does not accept argument 'posonly' as named argument. With normal normal=would work posonly=fails Name can be used with kwargs ${result} = Kwargs posonly x=1 y=2 Should be equal ${result} posonly, x: 1, y: 2 Mandatory positional-only missing with kwargs [Documentation] FAIL Keyword 'PositionalOnly.Kwargs' expected 1 non-named argument, got 0. Kwargs x=1
RobotFramework
4
bhirsz/robotframework
atest/testdata/keywords/positional_only_args.robot
[ "ECL-2.0", "Apache-2.0" ]
-- @shouldFailWith DuplicateRoleDeclaration module Main where data A a = A type role A nominal type role A phantom
PureScript
2
andys8/purescript
tests/purs/failing/DuplicateRoleDeclaration.purs
[ "BSD-3-Clause" ]
=== Circuit Breaker: Spring Cloud Circuit Breaker With Sentinel & Configuring Sentinel Circuit Breakers ==== Default Configuration To provide a default configuration for all of your circuit breakers create a `Customizer` bean that is passed a `SentinelCircuitBreakerFactory` or `ReactiveSentinelCircuitBreakerFactory`. The `configureDefault` method can be used to provide a default configuration. ==== [source,java] ---- @Bean public Customizer<SentinelCircuitBreakerFactory> defaultCustomizer() { return factory -> factory.configureDefault(id -> new SentinelConfigBuilder(id) .build()); } ---- ==== You can choose to provide default circuit breaking rules via `SentinelConfigBuilder#rules(rules)`. You can also choose to load circuit breaking rules later elsewhere using `DegradeRuleManager.loadRules(rules)` API of Sentinel, or via Sentinel dashboard. ===== Reactive Example ==== [source,java] ---- @Bean public Customizer<ReactiveSentinelCircuitBreakerFactory> defaultCustomizer() { return factory -> factory.configureDefault(id -> new SentinelConfigBuilder(id) .build()); } ---- ==== ==== Specific Circuit Breaker Configuration Similarly to providing a default configuration, you can create a `Customizer` bean this is passed a `SentinelCircuitBreakerFactory`. ==== [source,java] ---- @Bean public Customizer<SentinelCircuitBreakerFactory> slowCustomizer() { String slowId = "slow"; List<DegradeRule> rules = Collections.singletonList( new DegradeRule(slowId).setGrade(RuleConstant.DEGRADE_GRADE_RT) .setCount(100) .setTimeWindow(10) ); return factory -> factory.configure(builder -> builder.rules(rules), slowId); } ---- ==== ===== Reactive Example ==== [source,java] ---- @Bean public Customizer<ReactiveSentinelCircuitBreakerFactory> customizer() { List<DegradeRule> rules = Collections.singletonList( new DegradeRule().setGrade(RuleConstant.DEGRADE_GRADE_RT) .setCount(100) .setTimeWindow(10) ); return factory -> factory.configure(builder -> builder.rules(rules), "foo", "bar"); } ---- ====
AsciiDoc
4
woshare/spring-cloud-alibaba
spring-cloud-alibaba-docs/src/main/asciidoc/circuitbreaker-sentinel.adoc
[ "Apache-2.0" ]
class Fancy Package { class Installer : Handler { """ @Fancy::Package@ installer. Downloads packages from Github (usually the latest tagged version, if no version is specified, or the latest HEAD revision in the master branch) and install it to the @FANCY_PACKAGE_DIR. """ def initialize: @package_name version: @version ('latest) install_path: @install_path (ENV["FANCY_PACKAGE_DIR"]) { """ Creates a new @Fancy::Package@ installer for a given package name, an optional version (default is @'latest) and an optional installation path (default is the standard installation path for Fancy packages). """ initialize: @package_name install_path: @install_path } def run { """ Runs the installer & installs the package into @$FANCY_PACKAGE_DIR. """ filename = nil if: (@version == 'latest) then: { if: latest_tag then: |tag| { @version = tag } else: { @version = "master" } } plist = List new: (Fancy Package package_list_file) if: (plist has_package?: (@repository, @version)) then: { STDERR println: "Package #{@package_name} with version: #{@version} already installed. Aborting." return nil } filename = download_tgz: @version if: filename then: { # now unpack & check for dependencies unpack_dir = unpack_file: filename rename_dir: unpack_dir load_fancypack: |spec| { fulfill_spec: spec spec gh_user: @user Specification save: spec to: $ Fancy Package package_list_file } else: { "Something wen't wrong. Did not find a fancypack specification for package: " ++ @repository . raise! } } else: { STDERR println: "Installation aborted." STDERR println: "Got error while trying to install #{@package_name} with version: #{@version}" } } def latest_tag { """ Returns the latest tag (sorted alphabetically). """ tags sort last } def tags { """ @return @Array@ of git tags in the package's Github repository. """ require("json") require("http") url = "https://api.github.com/repos/#{@package_name}/git/refs/tags" try { return JSON load(HTTP get(url)) map: |tag| { tag["ref"] split: "refs/tags/" . last } } catch StandardError { return [] # no tags available, default to master (latest) } } def has_version?: version { """ @version Version of package to check for. @return @true, if this package has the given version, @false otherwise. Indicates, if a given version for this package is available on Github. """ match version { case "master" -> true case _ -> tags includes?: version } } def download_url: version { """ Returns the download url for a given version of the package to be installed. """ { "https://github.com/" ++ @package_name ++ "/tarball/" ++ version } if: $ has_version?: version } def download_tgz: version { """ Downloads the .tar.gz file from Github with the given version (tag or branch name) and saves it to the specified @install_path. The Default install_path is ~/.fancy/packages/. If an environment variable @FANCY_PACKAGE_DIR is defined, it will get used. """ if: (download_url: version) then: |download_url| { ["Downloading ", @package_name, " version ", version, " from: ", download_url] join println filename = [@user, "_", @repository, "-", version, ".tar.gz"] join # run curl to get the .tar.gz file cmd = ["curl -o ", @download_path, "/", filename, " -L -O ", download_url] join System do: cmd filename } } def unpack_file: filename { """ @filename File name of package's downloaded .tar.gz file (from Github) to extract Unpacks the given @filename and installs it into Fancy's package install dir. """ "Unpacking " ++ filename println System do: $ ["tar xf ", @download_path, "/", filename, " -C ", @install_path, "/"] join output = System pipe: $ ["tar tf ", @download_path, "/", filename] join dirname = output readlines first chomp } def rename_dir: dirname { """ Renames a given directory to a common way within the install path. => It will rename the given dirname to $user/$repo-$version. """ System do: $ ["mv ", @install_path, "/", dirname, " ", installed_path] join } def fulfill_spec: spec { """ @spec @Fancy::Package::Specification@ to be fulfilled. Installs all dependencies of @spec, sets up symlinks for binary files in @spec, as well as installing the include-file into the Fancy package lib dir. """ unless: (spec include_files empty?) do: { File write: (lib_path + "/" + (spec package_name)) with: |f| { spec include_files each: |if| { unless: (spec ruby_dependencies empty?) do: { f println: "require(\"rubygems\")" spec ruby_dependencies each: |rd| { f println: "require(\"#{rd gem_name}\")" } } f print: "require: \"" f print: installed_path f print: "/" f print: if f println: "\"" } } } spec bin_files each: |bf| { basename = File basename(bf) orig_path = "#{installed_path}/#{bf}" link_path = "#{bin_path}/#{basename}" "Creating symlink #{link_path} for #{orig_path}" println { File delete: link_path } if: $ File exists?: link_path File symlink(orig_path, link_path) } spec dependencies each: @{ install } spec ruby_dependencies each: @{ install } } } }
Fancy
5
bakkdoor/fancy
lib/package/installer.fy
[ "BSD-3-Clause" ]
bb_data ← 3 5 ⍴ 2.2372928847280580 1.0960951589853829 0.7075902730592357 0.8166828043492210 0.7075902730592357 0.0000000000000000 0.5998905309250137 0.4993160054719562 0.6669708029197080 0.5006839945280438 0.0000000000000000 0.4001094690749863 0.5006839945280438 0.3330291970802919 0.4993160054719562 bb_ind ← 3 5 ⍴ 5 2 1 3 4 0 0 0 2 3 0 5 2 5 5 md_c ← 3 3 ⍴ 1.0000000 0.6000000 0.8000000 0.6000000 0.8000000 0.1500000 0.8000000 0.1500000 0.5809475 md_disc ← 0.9797862861805930 0.9505748482484491 0.9214621679912968 0.8906693055891434 0.8588567633110704 md_drifts ← 5 3 ⍴ ¯0.0283491736871803 0.0178771081725381 0.0043096808044729 ¯0.0183841413744211 ¯0.0044530897672834 0.0024263805987983 ¯0.0172686581005089 0.0125638544546015 0.0094452810918001 ¯0.0144179417871814 0.0157411263968213 0.0125315353728014 ¯0.0121497422218761 0.0182904634062437 0.0151125070556484 md_starts ← 3758.0500000000001819 11840.0000000000000000 1200.0000000000000000 md_vols ← 5 3 ⍴ 0.1900000 0.1900000 0.1500000 0.1900000 0.1900000 0.1500000 0.1900000 0.1900000 0.1500000 0.1900000 0.1900000 0.1500000 0.1900000 0.1900000 0.1500000 dv ← 536870912 268435456 134217728 67108864 dv ← dv, 33554432 16777216 8388608 4194304 2097152 1048576 524288 dv ← dv, 262144 131072 65536 32768 16384 8192 4096 2048 1024 512 dv ← dv, 256 128 64 32 16 8 4 2 1 536870912 805306368 dv ← dv, 671088640 1006632960 570425344 855638016 713031680 1069547520 dv ← dv, 538968064 808452096 673710080 1010565120 572653568 858980352 dv ← dv, 715816960 1073725440 536879104 805318656 671098880 1006648320 dv ← dv, 570434048 855651072 713042560 1069563840 538976288 808464432 dv ← dv, 673720360 1010580540 572662306 858993459 536870912 dv ← dv, 805306368 402653184 603979776 973078528 385875968 595591168 dv ← dv, 826277888 438304768 657457152 999817216 358875136 538574848 dv ← dv, 807862272 406552576 605372416 975183872 389033984 597170176 dv ← dv, 828646400 437926400 656873216 1002152832 357921088 536885792 dv ← dv, 805312304 402662296 603992420 973085210 385885991 dv ← dv, 536870912 805306368 939524096 335544320 234881024 721420288 dv ← dv, 411041792 616562688 920649728 1062207488 381157376 258736128 dv ← dv, 771883008 453181440 545488896 817971200 954261504 340963328 dv ← dv, 238651392 732843008 417426944 609285376 909831040 1068349120 dv ← dv, 383778848 256901168 783810616 460062740 537001998 805503019 dv ← dv, 536870912 805306368 402653184 1006632960 167772160 285212672 dv ← dv, 713031680 566231040 853540864 489684992 952631296 208928768 dv ← dv, 316801024 758317056 550076416 813154304 417505280 1009913856 dv ← dv, 172697600 297131008 704744960 553894656 847291520 499194688 dv ← dv, 954376224 204607536 306915352 766893116 536972810 805552913 dv ← dv, 536870912 805306368 402653184 469762048 301989888 721420288 dv ← dv, 92274688 264241152 941621248 741343232 169345024 924581888 dv ← dv, 395444224 619380736 1034256384 603963392 838868992 452997120 dv ← dv, 494934016 331357184 706744832 120597248 261621120 953946048 dv ← dv, 800208928 148581424 935168536 350484252 630339474 1072370923 dv ← dv, 536870912 805306368 134217728 1006632960 503316480 754974720 dv ← dv, 629145600 440401920 94371840 711983104 229113856 374079488 dv ← dv, 330694656 996212736 907247616 557531136 867573760 190918656 dv ← dv, 1041467392 490437632 766918144 643898624 462663040 125527616 dv ← dv, 672545696 202454896 373006376 288845836 1000351766 930090001 dv ← dv, 536870912 268435456 402653184 872415232 838860800 956301312 dv ← dv, 612368384 717225984 211812352 386924544 302514176 688128000 dv ← dv, 1015414784 516751360 1051492352 773734400 914432000 63877120 dv ← dv, 807741440 165200896 748683776 118489344 168296832 486802240 dv ← dv, 243663648 667747216 439124552 81674924 975249610 350138737 dv ← dv, 536870912 268435456 671088640 469762048 973078528 1023410176 dv ← dv, 713031680 339738624 912261120 797966336 176685056 71565312 dv ← dv, 510263296 865533952 814120960 961232896 887136256 668078080 dv ← dv, 116070400 382772224 1047134720 597098752 411468416 625689024 dv ← dv, 249602976 449975248 745216680 43033924 134873446 201786361 dv ← dv, 536870912 268435456 402653184 67108864 704643072 385875968 dv ← dv, 696254464 205520896 920649728 946864128 359137280 859045888 dv ← dv, 302907392 50659328 462192640 524599296 895541248 590794752 dv ← dv, 168810496 118033408 831447552 138662144 485185920 796511296 dv ← dv, 1021313184 1064304752 619184920 997458052 250479054 745865975 dv ← dv, 536870912 268435456 939524096 1006632960 838860800 dv ← dv, 889192448 645922816 46137344 476053504 584056832 210239488 dv ← dv, 465829888 820903936 689897472 73695232 249118720 110075904 dv ← dv, 315338752 610637824 517665792 1049494016 785318144 376210304 dv ← dv, 735921088 402760480 738505552 168368744 151499820 344957894 dv ← dv, 936096557 536870912 805306368 939524096 1006632960 dv ← dv, 503316480 922746880 41943040 423624704 228589568 651165696 dv ← dv, 195559424 500957184 791019520 261292032 1040285696 118407168 dv ← dv, 982065152 625250304 329533440 298984448 153690624 76845824 dv ← dv, 579619712 692987840 900670432 450334832 363187112 719119956 dv ← dv, 765461306 382730781 536870912 805306368 402653184 dv ← dv, 603979776 838860800 117440512 478150656 658505728 752877568 dv ← dv, 1060110336 141033472 209453056 244187136 272957440 678068224 dv ← dv, 1014546432 377724928 876875776 443160576 998185984 168665600 dv ← dv, 318837504 914397568 71818816 40763680 527762288 939688008 dv ← dv, 335855668 705536494 587273091 536870912 268435456 dv ← dv, 671088640 738197504 637534208 150994944 813694976 943718400 dv ← dv, 77594624 179306496 798490624 967049216 134348800 1006698496 dv ← dv, 235044864 620937216 377643008 826314752 874711040 854819840 dv ← dv, 725109248 856992512 664336768 94804544 100663328 419430416 dv ← dv, 411041832 339738668 580911142 61865993 536870912 805306368 dv ← dv, 939524096 603979776 100663296 452984832 998244352 188743680 dv ← dv, 866123776 389021696 287834112 172228608 824836096 977731584 dv ← dv, 153714688 507854848 254402560 88403968 883578880 235160576 dv ← dv, 118055424 422917888 371224704 326210368 654926368 691353392 dv ← dv, 773877944 930190180 554263078 842348331 dirVec ← 15 30 ⍴ dv contract ← 2 ⍝ num_mc_it ← 1048576 num_mc_it ← 100000 num_dates ← 5 num_under ← 3 num_models ← 1 num_bits ← 30 testBit ← { 0≠⍵ ⎕INT32AND 1 ⎕INT32SHL (⍺-1) } grayCode ← { ⍵ ⎕INT32XOR ⍵ ⎕INT32SHR 1 } ⍝ Sobol sequences using inductive approach sobolIndI ← { dirVec ← ⍵ n ← ⍺ bitsNum ← (⍴dirVec)[⊃⍴⍴dirVec] bits ← ⍳bitsNum is ← n ∘.{⍵ testBit (grayCode ⍺)} bits is ⎕INT32XOR.× ⍉dirVec } sobolIndR ← { arri ← ⍺ sobolIndI ⍵ bitsNum ← (⍴⍵)[⊃⍴⍴⍵] arri÷2*bitsNum } ⍝ TODO: implement approach by Mike Giles et al. ⍝ Implement normal distribution using the method used in R: ⍝ https://svn.r-project.org/R/trunk/src/nmath/qnorm.c ⍝ Algorithm 111 and 241 (available at JSTOR) small_as ← 3.387132872796366608 133.14166789178437745 1971.5909503065514427 13731.693765509461125 small_as ← small_as, 45921.953931549871457 67265.770927008700853 33430.575583588128105 2509.0809287301226727 small_bs ← 1.0 42.313330701600911252 687.1870074920579083 5394.1960214247511077 small_bs ← small_bs , 21213.794301586595867 39307.89580009271061 28729.085735721942674 5226.495278852854561 interm_as ← 1.42343711074968357734 4.6303378461565452959 5.7694972214606914055 3.64784832476320460504 interm_as ← interm_as , 1.27045825245236838258 0.24178072517745061177 0.0227238449892691845833 (7.7454501427834140764 × 10*¯4) interm_bs ← 1.0 2.05319162663775882187 1.6763848301838038494 0.68976733498510000455 interm_bs ← interm_bs , 0.14810397642748007459 0.0151986665636164571966 (5.475938084995344946 × 10*¯4) (1.05075007164441684324 × 10*¯9) tail_as ← 6.6579046435011037772 5.4637849111641143699 1.7848265399172913358 0.29656057182850489123 tail_as ← tail_as , 0.026532189526576123093 0.0012426609473880784386 (2.71155556874348757815 × 10*¯4) (2.01033439929228813265 × 10*¯7) tail_bs ← 1.0 0.59983220655588793769 0.13692988092273580531 0.0148753612908506148525 tail_bs ← tail_bs , (7.868691311456132591 × 10*¯4) (1.8463183175100546818 × 10*¯5) (1.4215117583164458887 × 10*¯7) (2.04426310338993978564 × 10*¯15) appr ← { (⍺×(⍺×(⍺×(⍺×(⍺×(⍺×(⍺×⍵[8]+⍵[7])+⍵[6])+⍵[5])+⍵[4])+⍵[3])+⍵[2])+⍵[1]) } smallcase ← { x ← 0.180625 - ⍵×⍵ ⍵ × (x appr small_as) ÷ (x appr small_bs) } intermediate ← { x ← ⍵ - 1.6 (x appr interm_as) ÷ (x appr interm_bs) } tail ← { x ← ⍵ - 5.0 (x appr tail_as) ÷ (x appr tail_bs) } else ← {(⍺⍺⍣⍺)(⍵⍵⍣(~⍺))⍵} ugaussianEl ← { dp ← ⍵ - 0.5 ⍝ case 1 R1 ← smallcase dp ⍝ case 2 pp ← 0.5 + dp×-×dp r ← (-⍟pp)*0.5 x ← ((intermediate r) × r≤5.0) + (tail r) × r>5.0 R2 ← x × ×dp ⍝ conditional (R2 × (1 - 0.425≥|dp)) + R1 × (0.425≥|dp) } ugaussian ← { ugaussianEl ¨ ⍵ } brownianBridge ← { num_under ← ⍵[1] num_dates ← ⍵[2] bb_ind ← ⍵[3] bb_data ← ⍵[4] gauss ← ⍵[5] bb_bi ← bb_ind[1;] bb_li ← bb_ind[2;] bb_ri ← bb_ind[3;] bb_sd ← bb_data[1;] bb_lw ← bb_data[2;] bb_rw ← bb_data[3;] gauss2Dt ← (num_dates num_under)⍴gauss sz ← (⍉(num_under num_dates)⍴bb_sd) × gauss2Dt bbrow ← ((num_dates+1) num_under)⍴0.0 step ← { next ← (bb_lw[⍵]×bbrow[bb_li[⍵]+1;]) + sz[⍵;] + (bb_rw[⍵]×bbrow[bb_ri[⍵]+1;]) k ← bb_bi[⍵]+1 iter ← { bbrow[k;⍵] ← next[⍵] ⍵+1 } v ← (iter ⍣ num_under) 1 ⍵+1 } variable_not_used ← (step ⍣ num_dates) 1 (1↓bbrow) - num_dates↑bbrow } ⍝ Sets the values in the upper triangle to zero clearUpperTriangle ← { n ← ⊃1↑⍴ ⍵ ⍵ × (⍳n)∘.≥⍳n } ⍝ Black-Scholes ⍝ Currently num_under must be a constant, should be given as argument correlateDeltas ← { md_c ← ⍺ bb_arr ← ⍵ ⍝ Clear upper triangle - why are the numbers there when we don't use them? bb_arr +.× ⍉ clearUpperTriangle md_c } combineVs ← { n_row ← ⍵[1] vol_row ← ⍵[2] dr_row ← ⍵[3] dr_row + n_row × vol_row } mkPrices ← { md_starts ← ⍵[1] md_vols ← ⍵[2] md_drifts ← ⍵[3] noises ← ⍵[4] e_rows ← *combineVs noises md_vols md_drifts 1↓⍉×\md_starts , ⍉ e_rows } blackScholes ← { num_under ← ⍵[1] md_c ← ⍵[2] md_vols ← ⍵[3] md_drifts ← ⍵[4] md_starts ← ⍵[5] bb_arr ← ⍵[6] noises ← md_c correlateDeltas bb_arr mkPrices (md_starts md_vols md_drifts noises) } payoff2 ← { md_disc ← ⍺ xss ← ⍵ mins ← ⌊/xss × (⍴xss)⍴ ÷ 3758.05 11840.0 1200.0 bools ← (mins ≥ 1), (mins[5] ≥ 0.75), 1 X ← 1000.0 × md_disc[5] results ← (md_disc × 1000 + 150 × ⍳5), X, mins[5] × X (bools/results)[1] } compute ← { n ← ⍵ payoffs ← 0 sobol_mat ← (⍳⍵) sobolIndR dirVec gauss_mat ← ugaussian sobol_mat compute1 ← { bb_mat ← brownianBridge (num_under num_dates bb_ind bb_data (gauss_mat[⍵;])) bs_mat ← blackScholes (num_under md_c md_vols md_drifts md_starts bb_mat) md_disc payoff2 bs_mat } (+/compute1¨⍳n)÷n } compute num_mc_it
APL
5
melsman/apltail
tests/pricer.apl
[ "MIT" ]
/// <reference path="fourslash.ts" /> // @allowJs: true // @checkJs: true // @noEmit: true // @jsx: react // @esModuleInterop: true // @skipLibCheck: true // @Filename: declarations.d.ts ////declare namespace JSX { //// interface Element {} //// interface IntrinsicElements { [index: string]: {} } ////} ////declare var React: any; // @Filename: MyComponent.jsx ////class MyComponent extends React.Component { //// render() { //// return ( //// <div> //// {[|/*1*/doesNotExist|]} //// </div> //// ); //// } ////} // @Filename: MyComponent2.jsx ////class MyComponent2 extends React.Component { //// render() { //// return ( //// <div> //// Aleph{[|/*2*/doesNotExist|]}Bet //// </div> //// ); //// } ////} // @Filename: MyComponent3.jsx ////class MyComponent3 extends React.Component { //// render() { //// return ( //// <div> //// <[|/*3*/DoesNotExist|] /> //// </div> //// ); //// } ////} goTo.file(1); verify.getSyntacticDiagnostics([]); verify.getSemanticDiagnostics([{ code: 2304, message: "Cannot find name 'doesNotExist'." }]); verify.codeFix({ index: 0, description: "Ignore this error message", newFileContent: `class MyComponent extends React.Component { render() { return ( <div> { // @ts-ignore doesNotExist} </div> ); } }` }); goTo.file(2); verify.codeFix({ index: 0, description: "Ignore this error message", newFileContent: `class MyComponent2 extends React.Component { render() { return ( <div> Aleph{ // @ts-ignore doesNotExist}Bet </div> ); } }` }); goTo.file(3); verify.codeFix({ index: 0, description: "Ignore this error message", newFileContent: `class MyComponent3 extends React.Component { render() { return ( <div> < // @ts-ignore DoesNotExist /> </div> ); } }` });
TypeScript
5
nilamjadhav/TypeScript
tests/cases/fourslash/jsxTsIgnoreOnJSXExpressionsAndChildren.ts
[ "Apache-2.0" ]
export default /* glsl */` #ifdef USE_FOG uniform vec3 fogColor; varying float vFogDepth; #ifdef FOG_EXP2 uniform float fogDensity; #else uniform float fogNear; uniform float fogFar; #endif #endif `;
JavaScript
3
brunnacroches/portifolio-brunna
node_modules/three/src/renderers/shaders/ShaderChunk/fog_pars_fragment.glsl.js
[ "Unlicense" ]
$nyquist plug-in $version 4 $type process spectral $preview linear $name (_ "Spectral edit parametric EQ") $manpage "Spectral_edit_parametric_EQ" $action (_ "Filtering...") $author (_ "Paul Licameli") $release 2.3.0 $copyright (_ "Released under terms of the GNU General Public License version 2") ;; SpectralEditParametricEQ.ny by Paul Licameli, November 2014. ;; Updated by Steve Daulton 2014 / 2015. ;; Released under terms of the GNU General Public License version 2: ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html ;; ;; For information about writing and modifying Nyquist plug-ins: ;; https://wiki.audacityteam.org/wiki/Nyquist_Plug-ins_Reference $control control-gain (_ "Gain (dB)") real "" 0 -24 24 (defun wet (sig gain fc bw) (eq-band sig fc gain (/ bw 2))) (defun result (sig) (let* ((f0 (get '*selection* 'low-hz)) (f1 (get '*selection* 'high-hz)) (fc (get '*selection* 'center-hz)) (bw (get '*selection* 'bandwidth)) (tn (truncate len)) (rate (snd-srate sig)) (transition (truncate (* 0.01 rate))) ; 10 ms (t1 (min transition (/ tn 2))) ; fade in length (samples) (t2 (max (- tn transition) (/ tn 2))) ; length before fade out (samples) (breakpoints (list t1 1.0 t2 1.0 tn)) (env (snd-pwl 0.0 rate breakpoints))) (cond ((not (or f0 f1)) ; This should never happen for a 'spectral' effect. (throw 'error-message (format nil (_ "~aPlease select frequencies.") p-err))) ((not f0) (throw 'error-message (format nil (_ "~aLow frequency is undefined.") p-err))) ((not f1) (throw 'error-message (format nil (_ "~aHigh frequency is undefined.") p-err))) ((and fc (= fc 0)) (throw 'error-message (format nil (_ "~aCenter frequency must be above 0 Hz.") p-err))) ((and f1 (> f1 (/ *sound-srate* 2))) (throw 'error-message (format nil (_ "~aFrequency selection is too high for track sample rate.~%~ For the current track, the high frequency setting cannot~%~ be greater than ~a Hz") p-err (/ *sound-srate* 2)))) ((and bw (= bw 0)) (throw 'error-message (format nil (_ "~aBandwidth is zero (the upper and lower~%~ frequencies are both ~a Hz).~%~ Please select a frequency range.") p-err f0))) ;; If centre frequency band is above Nyquist, do nothing. ((and fc (>= fc (/ *sound-srate* 2.0))) nil) (t (sum (prod env (wet sig control-gain fc bw)) (prod (diff 1.0 env) sig)))))) (catch 'error-message (setf p-err (format nil (_ "Error.~%"))) (if (= control-gain 0) nil ; Do nothing (multichan-expand #'result *track*)))
Common Lisp
4
joshrose/audacity
plug-ins/SpectralEditParametricEQ.ny
[ "CC-BY-3.0" ]
<ion-view><button-view/><font-face></font-face></ion-view>
HTML
1
sbj42/vscode
extensions/vscode-colorize-tests/test/colorize-fixtures/13448.html
[ "MIT" ]
i ← 10 30 a ← i ⍴ ⍳ 49 b ← (⍉ a), ⍳ 30 c ← a +.× b +/ +/ c ⍝ 1934351
APL
3
mbudde/apltail
tests/test16.apl
[ "MIT" ]
The typed DeBruijn representation is well known, as are typed PHOAS and untyped DeBruijn. It is easy to convert PHOAS to untyped DeBruijn. Is it known how to convert PHOAS to typed DeBruijn? Yours, -- P ## Imports \begin{code} open import Relation.Binary.PropositionalEquality using (_≡_; refl) open import Data.Nat using (ℕ; zero; suc; _+_; _∸_) \end{code} ## Typed DeBruijn \begin{code} infixr 4 _⇒_ data Type : Set where o : Type _⇒_ : Type → Type → Type data Env : Set where ε : Env _,_ : Env → Type → Env data Var : Env → Type → Set where Z : ∀ {Γ : Env} {A : Type} → Var (Γ , A) A S : ∀ {Γ : Env} {A B : Type} → Var Γ B → Var (Γ , A) B data Exp : Env → Type → Set where var : ∀ {Γ : Env} {A : Type} → Var Γ A → Exp Γ A abs : ∀ {Γ : Env} {A B : Type} → Exp (Γ , A) B → Exp Γ (A ⇒ B) app : ∀ {Γ : Env} {A B : Type} → Exp Γ (A ⇒ B) → Exp Γ A → Exp Γ B \end{code} ## Untyped DeBruijn \begin{code} data DB : Set where var : ℕ → DB abs : DB → DB app : DB → DB → DB \end{code} # PHOAS \begin{code} data PH (X : Type → Set) : Type → Set where var : ∀ {A : Type} → X A → PH X A abs : ∀ {A B : Type} → (X A → PH X B) → PH X (A ⇒ B) app : ∀ {A B : Type} → PH X (A ⇒ B) → PH X A → PH X B \end{code} # Convert PHOAS to DB \begin{code} PH→DB : ∀ {A} → (∀ {X} → PH X A) → DB PH→DB M = h M 0 where K : Type → Set K A = ℕ h : ∀ {A} → PH K A → ℕ → DB h (var k) j = var (j ∸ k) h (abs N) j = abs (h (N (j + 1)) (j + 1)) h (app L M) j = app (h L j) (h M j) \end{code} # Test examples \begin{code} Church : Type Church = (o ⇒ o) ⇒ o ⇒ o twoExp : Exp ε Church twoExp = (abs (abs (app (var (S Z)) (app (var (S Z)) (var Z))))) twoPH : ∀ {X} → PH X Church twoPH = (abs (λ f → (abs (λ x → (app (var f) (app (var f) (var x))))))) twoDB : DB twoDB = (abs (abs (app (var 1) (app (var 1) (var 0))))) ex : PH→DB twoPH ≡ twoDB ex = refl \end{code}
Literate Agda
4
manikdv/plfa.github.io
extra/extra/DeBruijn-agda-list.lagda
[ "CC-BY-4.0" ]
.content { color: inherit; }
CSS
1
blomqma/next.js
test/integration/production/components/dynamic-css/shared-css-module/with-css.module.css
[ "MIT" ]
#!/usr/bin/env bash if [[ "$OSTYPE" == "darwin"* ]]; then realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; } ROOT=$(dirname $(dirname $(realpath "$0"))) else ROOT=$(dirname $(dirname $(readlink -f $0))) fi function code() { cd $ROOT if [[ "$OSTYPE" == "darwin"* ]]; then NAME=`node -p "require('./product.json').nameLong"` CODE="./.build/electron/$NAME.app/Contents/MacOS/Electron" else NAME=`node -p "require('./product.json').applicationName"` CODE=".build/electron/$NAME" fi # Get electron, compile, built-in extensions if [[ -z "${VSCODE_SKIP_PRELAUNCH}" ]]; then node build/lib/preLaunch.js fi # Manage built-in extensions if [[ "$1" == "--builtin" ]]; then exec "$CODE" build/builtin return fi ELECTRON_RUN_AS_NODE=1 \ NODE_ENV=development \ VSCODE_DEV=1 \ ELECTRON_ENABLE_LOGGING=1 \ ELECTRON_ENABLE_STACK_DUMPING=1 \ "$CODE" --inspect=5874 "$ROOT/out/cli.js" --ms-enable-electron-run-as-node . "$@" } code "$@"
Shell
4
sbj42/vscode
scripts/code-cli.sh
[ "MIT" ]
untyped global function LoadoutCrate_Init const LOADOUT_CRATE_MODEL = $"models/containers/pelican_case_ammobox.mdl" global function AddLoadoutCrate global function DestroyAllLoadoutCrates function LoadoutCrate_Init() { level.loadoutCrateManagedEntArrayID <- CreateScriptManagedEntArray() PrecacheModel( LOADOUT_CRATE_MODEL ) AddSpawnCallback( "prop_dynamic", LoadoutCreatePrePlaced ) } function AddLoadoutCrate( team, vector origin, vector angles, bool showOnMinimap = true, entity crate = null ) { expect int( team ) local crateCount = GetScriptManagedEntArray( level.loadoutCrateManagedEntArrayID ).len() Assert( crateCount < MAX_LOADOUT_CRATE_COUNT, "Can't have more than " + MAX_LOADOUT_CRATE_COUNT + " Loadout Crates" ) angles += Vector( 0, -90, 0 ) if ( !IsValid( crate ) ) { crate = CreatePropScript( LOADOUT_CRATE_MODEL, origin, angles, 6 ) SetTargetName( crate, "loadoutCrate" ) } SetTeam( crate, team ) crate.SetUsable() if ( team == TEAM_MILITIA || team == TEAM_IMC ) crate.SetUsableByGroup( "friendlies pilot" ) else crate.SetUsableByGroup( "pilot" ) crate.SetUsePrompts( "#LOADOUT_CRATE_HOLD_USE", "#LOADOUT_CRATE_PRESS_USE" ) crate.SetForceVisibleInPhaseShift( true ) if ( showOnMinimap ) { #if R1_VGUI_MINIMAP crate.Minimap_SetDefaultMaterial( $"vgui/hud/coop/coop_ammo_locker_icon" ) #endif crate.Minimap_SetObjectScale( MINIMAP_LOADOUT_CRATE_SCALE ) crate.Minimap_SetAlignUpright( true ) crate.Minimap_AlwaysShow( TEAM_IMC, null ) crate.Minimap_AlwaysShow( TEAM_MILITIA, null ) crate.Minimap_SetHeightTracking( true ) crate.Minimap_SetZOrder( MINIMAP_Z_OBJECT ) crate.Minimap_SetCustomState( eMinimapObject_prop_script.FD_LOADOUT_CHEST ) } AddToScriptManagedEntArray( level.loadoutCrateManagedEntArrayID, crate ) //thread LoadoutCrateMarkerThink( "LoadoutCrateMarker" + string( crateCount ), crate ) thread LoadoutCrateThink( crate ) thread LoadoutCrateRestockAmmoThink( crate ) Highlight_SetNeutralHighlight( crate, "interact_object_los" ) } void function LoadoutCreatePrePlaced( entity ent ) { if ( ent.GetTargetName().find( "loot_crate" ) == 0 ) { ent.Destroy() return } if ( ent.GetTargetName().find( "loadout_crate" ) != 0 ) return if ( IsSingleplayer() ) return vector angles = ent.GetAngles() + Vector( 0, 90, 0 ) AddLoadoutCrate( TEAM_BOTH, ent.GetOrigin(), angles, false, ent ) } function LoadoutCrateMarkerThink( marker, crate ) { crate.EndSignal( "OnDestroy" ) crate.EndSignal( "OnDeath" ) OnThreadEnd( function() : ( marker ) { ClearMarker( marker ) } ) while ( 1 ) { if ( GetGameState() <= eGameState.Prematch ) ClearMarker( marker ) else SetMarker( marker, crate ) svGlobal.levelEnt.WaitSignal( "GameStateChanged" ) } } function LoadoutCrateThink( crate ) { crate.EndSignal( "OnDestroy" ) while ( true ) { var player = crate.WaitSignal( "OnPlayerUse" ).player if ( player.IsPlayer() ) { thread UsingLoadoutCrate( crate, player ) wait 1 // debounce on using the crate to minimize the risk of using it twice before the menu opens. } } } function LoadoutCrateRestockAmmoThink( crate ) { crate.EndSignal( "OnDestroy" ) local distSqr local crateOrigin = crate.GetOrigin() local triggerDistSqr = 96 * 96 local resetDistSqr = 384 * 384 while ( true ) { wait 1 // check every second array<entity> playerArray = GetPlayerArray_Alive() foreach( player in playerArray ) { if ( player.IsTitan() ) continue if ( player.ContextAction_IsBusy() ) continue distSqr = DistanceSqr( crateOrigin, player.GetOrigin() ) if ( distSqr <= triggerDistSqr && player.s.restockAmmoTime < Time() ) { if ( TraceLineSimple( player.EyePosition(), crate.GetOrigin() + Vector( 0.0, 0.0, 24.0 ), crate ) == 1.0 ) { player.s.restockAmmoCrate = crate player.s.restockAmmoTime = Time() + 10 // debounce time before you can get new ammo again if you stay next to the crate. //MessageToPlayer( player, eEventNotifications.CoopAmmoRefilled, null, null ) RestockPlayerAmmo( player ) } } if ( distSqr > resetDistSqr && player.s.restockAmmoTime > 0 && player.s.restockAmmoCrate == crate ) { player.s.restockAmmoCrate = null player.s.restockAmmoTime = 0 } } } } function UsingLoadoutCrate( crate, player ) { expect entity( player ) player.p.usingLoadoutCrate = true player.s.usedLoadoutCrate = true EmitSoundOnEntityOnlyToPlayer( player, player, "Coop_AmmoBox_Open" ) Remote_CallFunction_UI( player, "ServerCallback_OpenPilotLoadoutMenu" ) } // should be called if we enter an epilogue ... maybe? function DestroyAllLoadoutCrates() { local crateArray = GetScriptManagedEntArray( level.loadoutCrateManagedEntArrayID ) foreach( crate in crateArray ) crate.Destroy() //dissolve didn't work //Dissolve( ENTITY_DISSOLVE_CHAR, Vector( 0, 0, 0 ), 0 ) //ENTITY_DISSOLVE_CORE //ENTITY_DISSOLVE_NORMAL }
Squirrel
4
GeckoEidechse/NorthstarMods
Northstar.CustomServers/mod/scripts/vscripts/mp/_loadout_crate.nut
[ "MIT" ]
/outfile1 (target/test/com/itextpdf/io/GhostscriptHelperTest/output1.txt) (w) file def outfile1 (This is important data that is evaluated on post script runtime. It's stored in one file, then read from it and written to another.) writestring outfile1 closefile /inputfile (target/test/com/itextpdf/io/GhostscriptHelperTest/output1.txt) (r) file def inputfile 131 string readstring pop inputfile closefile /outfile2 (target/test/com/itextpdf/io/GhostscriptHelperTest/output2.txt) (w) file def outfile2 exch writestring outfile2 closefile
PostScript
2
MC-JY/itext7
io/src/test/resources/com/itextpdf/io/util/GhostscriptHelperTest/unsafePostScript.ps
[ "RSA-MD" ]
<?xml version='1.0' encoding='UTF-8'?> <Project Type="Project" LVVersion="13008000"> <Property Name="NI.LV.All.SourceOnly" Type="Bool">true</Property> <Item Name="My Computer" Type="My Computer"> <Property Name="IOScan.Faults" Type="Str"></Property> <Property Name="IOScan.NetVarPeriod" Type="UInt">100</Property> <Property Name="IOScan.NetWatchdogEnabled" Type="Bool">false</Property> <Property Name="IOScan.Period" Type="UInt">10000</Property> <Property Name="IOScan.PowerupMode" Type="UInt">0</Property> <Property Name="IOScan.Priority" Type="UInt">9</Property> <Property Name="IOScan.ReportModeConflict" Type="Bool">true</Property> <Property Name="IOScan.StartEngineOnDeploy" Type="Bool">false</Property> <Property Name="server.app.propertiesEnabled" Type="Bool">true</Property> <Property Name="server.control.propertiesEnabled" Type="Bool">true</Property> <Property Name="server.tcp.enabled" Type="Bool">false</Property> <Property Name="server.tcp.port" Type="Int">0</Property> <Property Name="server.tcp.serviceName" Type="Str">My Computer/VI Server</Property> <Property Name="server.tcp.serviceName.default" Type="Str">My Computer/VI Server</Property> <Property Name="server.vi.callsEnabled" Type="Bool">true</Property> <Property Name="server.vi.propertiesEnabled" Type="Bool">true</Property> <Property Name="specify.custom.address" Type="Bool">false</Property> <Item Name="SMO.jsonRPC.lvclass" Type="LVClass" URL="../SMO.jsonRPC/SMO.jsonRPC.lvclass"/> <Item Name="Dependencies" Type="Dependencies"> <Item Name="user.lib" Type="Folder"> <Item Name="Array of VData to VArray__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Array of VData to VArray__ogtk.vi"/> <Item Name="Array of VData to VCluster__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Array of VData to VCluster__ogtk.vi"/> <Item Name="Array Size(s)__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Array Size(s)__ogtk.vi"/> <Item Name="Array to Array of VData__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Array to Array of VData__ogtk.vi"/> <Item Name="Build Error Cluster__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/error/error.llb/Build Error Cluster__ogtk.vi"/> <Item Name="Cluster to Array of VData__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Cluster to Array of VData__ogtk.vi"/> <Item Name="Get Array Element TD__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Get Array Element TD__ogtk.vi"/> <Item Name="Get Data Name from TD__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Get Data Name from TD__ogtk.vi"/> <Item Name="Get Data Name__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Get Data Name__ogtk.vi"/> <Item Name="Get Element TD from Array TD__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Get Element TD from Array TD__ogtk.vi"/> <Item Name="Get Header from TD__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Get Header from TD__ogtk.vi"/> <Item Name="Get Last PString__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Get Last PString__ogtk.vi"/> <Item Name="Get PString__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Get PString__ogtk.vi"/> <Item Name="Get TDEnum from Data__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Get TDEnum from Data__ogtk.vi"/> <Item Name="Get Variant Attributes__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Get Variant Attributes__ogtk.vi"/> <Item Name="Parse String with TDs__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Parse String with TDs__ogtk.vi"/> <Item Name="Reshape 1D Array__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Reshape 1D Array__ogtk.vi"/> <Item Name="Reshape Array to 1D VArray__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Reshape Array to 1D VArray__ogtk.vi"/> <Item Name="Set Data Name__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Set Data Name__ogtk.vi"/> <Item Name="Split Cluster TD__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Split Cluster TD__ogtk.vi"/> <Item Name="Type Descriptor Enumeration__ogtk.ctl" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Type Descriptor Enumeration__ogtk.ctl"/> <Item Name="Type Descriptor Header__ogtk.ctl" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Type Descriptor Header__ogtk.ctl"/> <Item Name="Type Descriptor__ogtk.ctl" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Type Descriptor__ogtk.ctl"/> <Item Name="Variant to Header Info__ogtk.vi" Type="VI" URL="/&lt;userlib&gt;/_OpenG.lib/lvdata/lvdata.llb/Variant to Header Info__ogtk.vi"/> </Item> <Item Name="vi.lib" Type="Folder"> <Item Name="Add State(s) to Queue__jki_lib_state_machine.vi" Type="VI" URL="/&lt;vilib&gt;/addons/_JKI Toolkits/State Machine/_jki_lib_state_machine.llb/Add State(s) to Queue__jki_lib_state_machine.vi"/> <Item Name="Attribute.Config.lvclass" Type="LVClass" URL="/&lt;vilib&gt;/JKI/JKI SMO/Support/Attribute.Config/Attribute.Config.lvclass"/> <Item Name="Attribute.Identity.lvclass" Type="LVClass" URL="/&lt;vilib&gt;/JKI/JKI SMO/Support/Attribute.Identity/Attribute.Identity.lvclass"/> <Item Name="Attribute.lvclass" Type="LVClass" URL="/&lt;vilib&gt;/JKI/JKI SMO/Support/Attribute/Attribute.lvclass"/> <Item Name="Attribute.Owner.lvclass" Type="LVClass" URL="/&lt;vilib&gt;/JKI/JKI SMO/Support/Attribute.Owner/Attribute.Owner.lvclass"/> <Item Name="Attribute.SharedResource.lvclass" Type="LVClass" URL="/&lt;vilib&gt;/JKI/JKI SMO/Support/Attribute.SharedResource/Attribute.SharedResource.lvclass"/> <Item Name="Attribute.StartupBehavior.lvclass" Type="LVClass" URL="/&lt;vilib&gt;/JKI/JKI SMO/Support/Attribute.StartupBehavior/Attribute.StartupBehavior.lvclass"/> <Item Name="BuildHelpPath.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/BuildHelpPath.vi"/> <Item Name="Check Special Tags.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Check Special Tags.vi"/> <Item Name="Clear Errors.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Clear Errors.vi"/> <Item Name="Convert property node font to graphics font.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Convert property node font to graphics font.vi"/> <Item Name="Dependency.lvclass" Type="LVClass" URL="/&lt;vilib&gt;/JKI/JKI SMO/Dependency/Dependency.lvclass"/> <Item Name="Details Display Dialog.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Details Display Dialog.vi"/> <Item Name="DialogType.ctl" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/DialogType.ctl"/> <Item Name="DialogTypeEnum.ctl" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/DialogTypeEnum.ctl"/> <Item Name="Error Cluster From Error Code.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Error Cluster From Error Code.vi"/> <Item Name="Error Code Database.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Error Code Database.vi"/> <Item Name="ErrWarn.ctl" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/ErrWarn.ctl"/> <Item Name="eventvkey.ctl" Type="VI" URL="/&lt;vilib&gt;/event_ctls.llb/eventvkey.ctl"/> <Item Name="Find Tag.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Find Tag.vi"/> <Item Name="Format Message String.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Format Message String.vi"/> <Item Name="General Error Handler CORE.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/General Error Handler CORE.vi"/> <Item Name="General Error Handler.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/General Error Handler.vi"/> <Item Name="Get File Extension.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/libraryn.llb/Get File Extension.vi"/> <Item Name="Get LV Class Name.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/LVClass/Get LV Class Name.vi"/> <Item Name="Get String Text Bounds.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Get String Text Bounds.vi"/> <Item Name="Get Text Rect.vi" Type="VI" URL="/&lt;vilib&gt;/picture/picture.llb/Get Text Rect.vi"/> <Item Name="GetHelpDir.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/GetHelpDir.vi"/> <Item Name="GetRTHostConnectedProp.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/GetRTHostConnectedProp.vi"/> <Item Name="JKI JSON Serialization.lvlib" Type="Library" URL="/&lt;vilib&gt;/addons/_JKI.lib/Serialization/JSON/JKI JSON Serialization.lvlib"/> <Item Name="JKI Serialization.lvlib" Type="Library" URL="/&lt;vilib&gt;/addons/_JKI.lib/Serialization/Core/JKI Serialization.lvlib"/> <Item Name="JKI Unicode.lvlib" Type="Library" URL="/&lt;vilib&gt;/addons/_JKI.lib/Unicode/JKI Unicode.lvlib"/> <Item Name="JSON RPC 2.0.lvlib" Type="Library" URL="/&lt;vilib&gt;/JKI/JKI JSON RPC Specification/JSON RPC 2.0.lvlib"/> <Item Name="Longest Line Length in Pixels.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Longest Line Length in Pixels.vi"/> <Item Name="LVBoundsTypeDef.ctl" Type="VI" URL="/&lt;vilib&gt;/Utility/miscctls.llb/LVBoundsTypeDef.ctl"/> <Item Name="LVDateTimeRec.ctl" Type="VI" URL="/&lt;vilib&gt;/Utility/miscctls.llb/LVDateTimeRec.ctl"/> <Item Name="MD5Checksum core.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/MD5Checksum.llb/MD5Checksum core.vi"/> <Item Name="MD5Checksum format message-digest.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/MD5Checksum.llb/MD5Checksum format message-digest.vi"/> <Item Name="MD5Checksum pad.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/MD5Checksum.llb/MD5Checksum pad.vi"/> <Item Name="MD5Checksum string.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/MD5Checksum.llb/MD5Checksum string.vi"/> <Item Name="Not Found Dialog.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Not Found Dialog.vi"/> <Item Name="Parse State Queue__jki_lib_state_machine.vi" Type="VI" URL="/&lt;vilib&gt;/addons/_JKI Toolkits/State Machine/_jki_lib_state_machine.llb/Parse State Queue__jki_lib_state_machine.vi"/> <Item Name="Registry-SMO.lvclass" Type="LVClass" URL="/&lt;vilib&gt;/JKI/JKI SMO/Registry/Registry-SMO.lvclass"/> <Item Name="Search and Replace Pattern.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Search and Replace Pattern.vi"/> <Item Name="Set Bold Text.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Set Bold Text.vi"/> <Item Name="Set Busy.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/cursorutil.llb/Set Busy.vi"/> <Item Name="Set Cursor (Cursor ID).vi" Type="VI" URL="/&lt;vilib&gt;/Utility/cursorutil.llb/Set Cursor (Cursor ID).vi"/> <Item Name="Set Cursor (Icon Pict).vi" Type="VI" URL="/&lt;vilib&gt;/Utility/cursorutil.llb/Set Cursor (Icon Pict).vi"/> <Item Name="Set Cursor.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/cursorutil.llb/Set Cursor.vi"/> <Item Name="Set String Value.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Set String Value.vi"/> <Item Name="Simple Error Handler.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Simple Error Handler.vi"/> <Item Name="SMO.lvclass" Type="LVClass" URL="/&lt;vilib&gt;/JKI/JKI SMO/SMO/SMO.lvclass"/> <Item Name="TagReturnType.ctl" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/TagReturnType.ctl"/> <Item Name="Three Button Dialog CORE.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Three Button Dialog CORE.vi"/> <Item Name="Three Button Dialog.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Three Button Dialog.vi"/> <Item Name="Trim Whitespace.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Trim Whitespace.vi"/> <Item Name="Unset Busy.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/cursorutil.llb/Unset Busy.vi"/> <Item Name="VariantType.lvlib" Type="Library" URL="/&lt;vilib&gt;/Utility/VariantDataType/VariantType.lvlib"/> <Item Name="whitespace.ctl" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/whitespace.ctl"/> </Item> </Item> <Item Name="Build Specifications" Type="Build"/> </Item> </Project>
LabVIEW
2
JKISoftware/JKI-SMO-Templates
src/json-rpc templates/JSON-RPC SMO Template.lvproj
[ "BSD-3-Clause" ]
;; Copyright (c) 2009-2015 Robert Virding ;; ;; Licensed under the Apache License, Version 2.0 (the "License"); ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; http://www.apache.org/licenses/LICENSE-2.0 ;; ;; Unless required by applicable law or agreed to in writing, software ;; distributed under the License is distributed on an "AS IS" BASIS, ;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ;; See the License for the specific language governing permissions and ;; limitations under the License. ;; The module definition and exports. ##module ;; User code. This is placed here to allow extra attributes. ##code (defrecord spell1 (line 'none) (st ()) (vs ())) ;; parse1(Continuation, Tokens) -> ;; #(ok line sexpr rest) | #(more continuation) | #(error error rest). ;; This is the opt-level of the LL engine. It ;; initialises/packs/unpacks the continuation information. (defun parse1 ([() ts] ;First call (let ((start (start))) (parse1 (make-spell1 line 'none st (list start) vs ()) ts))) ([(= (match-spell1 line 'none) lp) (= (cons t _) ts)] (parse1 (set-spell1-line lp (line t)) ts)) ([(match-spell1 line l st st0 vs vs0) ts] (try (parse2 ts st0 vs0) (case (`#(done ,rest () (,v)) `#(ok ,l ,v ,rest)) (`#(more () ,st1 ,vs1) `#(more ,(make-spell1 line l st st1 vs vs1))) (`#(error ,line ,error ,rest ,_ ,_) ;; Can't really continue from errors here. Give line ;; number of start of uncompleted form. `(error #(,l ,(MODULE) ,error) ,rest))) (catch (`#(throw #(spell1-error ,error) ,_) ;User error `#(error ,error ())))))) ;; parse2(Tokens, StateStack, ValueStack) -> ;; #(done ts s-stack v-stack) | #(more ts s-stack v-stack) | ;; #(error line error ts s-stack v-stack). ;; Main loop of the parser engine. Handle any reductions on the top ;; of the StateStack, then try to match type of next token with top ;; state. If we have a match, it is a terminal, then push token onto ;; value stack, else try to find new state(s) from table using ;; current state and token type and push them onto state ;; stack. Continue until no states left. (defun parse2 ([ts `(#(reduce ,r) . ,st) vs0] ;; Try to reduce values and push value on value stack. (case (reduce r vs0) (`#(error ,l ,e) `#(error ,l ,e ,ts ,st ,vs0)) (vs1 (parse2 ts st vs1)))) ([ts () vs] `#(done ,ts () ,vs)) ([(= (cons t ts) ts0) (= (cons s st) st0) vs] ;; Try to match token type against state on stack. (let ((tt (type t))) (if (=:= tt s) ;Match (parse2 ts st (cons t vs)) (case (table s tt) ;Try to predict ('error `#(error ,(line t) #(illegal ,tt) ,ts0 ,st0 ,vs)) (top (parse2 ts0 (++ top st) vs)))))) ([() st vs] ;Need more tokens (tuple 'more () st vs)) ([(= ts `#(eof ,l)) st vs] ;No more tokens `#(error ,l missing_token ,ts ,st ,vs))) ;; Access the fields of a token. (defun type (t) (element 1 t)) (defun line (t) (element 2 t)) (defun value (t) (element 3 t)) ;; The root symbol entry points. ##entry ;; The table. ##table ;; The reductions, we are naive and straight forward here. ##reduce ;; format_error(Error) -> String. ;; Format errors to printable string. (defun format_error (['missing_token] "missing token") ([`#(illegal ,what)] (lfe_io:format1 "illegal ~p" (list what))) ([message] (if (io_lib:deep_char_list message) message (lfe_io:print1 message)))) ;; return_error(Error). ;; To be used in grammar files to throw an error message to the ;; parser toplevel. Doesn't have to be exported! (defun return_error (line message) (throw `#(spell1-error #(,line ,(MODULE) ,message))))
LFE
5
rvirding/spell1
include/spell1inc.lfe
[ "Apache-2.0" ]
<#import "/spring.ftl" as spring/> <html> <head> <meta charset="ISO-8859-1" /> <title>User Registration</title> </head> <body> <form action="register" method="post"> <@spring.bind path="user" /> Email:<@spring.formInput "user.email"/> <br /> Password:<@spring.formPasswordInput "user.password"/> <br /> <input type="submit" value="Submit" /> </form> </body> </html>
FreeMarker
3
zeesh49/tutorials
spring-mvc-simple/src/main/webapp/WEB-INF/views/registration-freemarker.ftl
[ "MIT" ]
import React from 'react' import Image from 'next/image' import img from '../public/test.jpg' import style from '../style.module.css' const Page = () => { return ( <div className={style.displayFlex}> <Image id="img" layout="responsive" src={img} /> </div> ) } export default Page
JavaScript
3
blomqma/next.js
test/integration/image-component/default/pages/layout-responsive-inside-flex.js
[ "MIT" ]
=pod =head1 NAME EVP_bf_cbc, EVP_bf_cfb, EVP_bf_cfb64, EVP_bf_ecb, EVP_bf_ofb - EVP Blowfish cipher =head1 SYNOPSIS #include <openssl/evp.h> const EVP_CIPHER *EVP_bf_cbc(void); const EVP_CIPHER *EVP_bf_cfb(void); const EVP_CIPHER *EVP_bf_cfb64(void); const EVP_CIPHER *EVP_bf_ecb(void); const EVP_CIPHER *EVP_bf_ofb(void); =head1 DESCRIPTION The Blowfish encryption algorithm for EVP. This is a variable key length cipher. =over 4 =item EVP_bf_cbc(), EVP_bf_cfb(), EVP_bf_cfb64(), EVP_bf_ecb(), EVP_bf_ofb() Blowfish encryption algorithm in CBC, CFB, ECB and OFB modes respectively. =back =head1 RETURN VALUES These functions return an B<EVP_CIPHER> structure that contains the implementation of the symmetric cipher. See L<EVP_CIPHER_meth_new(3)> for details of the B<EVP_CIPHER> structure. =head1 SEE ALSO L<evp(7)>, L<EVP_EncryptInit(3)>, L<EVP_CIPHER_meth_new(3)> =head1 COPYRIGHT Copyright 2017-2020 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at L<https://www.openssl.org/source/license.html>. =cut
Pod
4
pmesnier/openssl
doc/man3/EVP_bf_cbc.pod
[ "Apache-2.0" ]
@Make[Manual] @comment{-*- Dictionary: /afs/cs/project/clisp/scribe/hem/hem; Mode: spell; Package: Hemlock -*-} @Device[postscript] @Style(Spacing = 1.2 lines) @Style(StringMax = 5000) @Use(Database "/afs/cs/project/clisp/docs/database/") @Style(FontFamily=TimesRoman) @Style(Date="March 1952") @style(DOUBLESIDED) @Libraryfile[ArpaCredit] @libraryfile[hem] @Libraryfile[Spice] @Libraryfile[Uttir] @String(REPORTTITLE "Hemlock User's Manual") @comment<@begin[TitlePage] @begin[TitleBox] > @blankspace(1.3inches) @heading[Hemlock User's Manual] @center[@b<Bill Chiles> @b<Robert A. MacLachlan> @b<@value[date]> @b<CMU-CS-89-133-R1> ] @comment<@end[TitleBox]> @blankspace(2lines) @begin[Center] School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213 @end[Center] @blankspace[2lines] @begin[Center] This is a revised version of Technical Report CMU-CS-87-158. @end[Center] @heading<Abstract> @begin(Text, indent 0) This document describes the @Hemlock text editor, version M3.2. @Hemlock is a customizable, extensible text editor whose initial command set closely resembles that of ITS/TOPS-20 @Emacs. @Hemlock is written in CMU Common Lisp and has been ported to other implementations. @end(Text) @begin[ResearchCredit] @ArpaCredit[Contract=Basic87-90] @end[ResearchCredit] @comment<@end[TitlePage]> @commandstring(mh = "@f1(MH)") @commandstring(dash = "@Y[M]") @comment[This tabclear is necessary since the definition macros don't take care of the own tabbing needs] @tabclear @comment[@chap (Introduction)] @include(intro) @comment[@chap (Basic Commands)] @include(commands) @chap[Files, Buffers, and Windows] @section[Introduction] @index[files] @index[buffers] @index[windows] @hemlock provides three different abstractions which are used in combination to solve the text-editing problem, while other editors tend to mash these ideas together into two or even one. @begin[description] File@\A file provides permanent storage of text. @hemlock has commands to read files into buffers and write buffers out into files. Buffer@\A buffer provides temporary storage of text and a capability to edit it. A buffer may or may not have a file associated with it; if it does, the text in the buffer need bear no particular relation to the text in the file. In addition, text in a buffer may be displayed in any number of windows, or may not be displayed at all. Window@\A window displays some portion of a buffer on the screen. There may be any number of windows on the screen, each of which may display any position in any buffer. It is thus possible, and often useful, to have several windows displaying different places in the same buffer. @end[description] @section[Buffers] In addition to some text, a buffer has several other user-visible attributes: @begin[description] A name@\ A buffer is identified by its name, which allows it to be selected, destroyed, or otherwise manipulated. A collection of modes@\ The modes present in a buffer alter the set of commands available and otherwise alter the behavior of the editor. For details see page @pageref[modes]. A modification flag @\ This flag is set whenever the text in a buffer is modified. It is often useful to know whether a buffer has been changed, since if it has it should probably be saved in its associated file eventually. A write-protect flag @\ If this flag is true, then any attempt to modify the buffer will result in an error. @end[description] @defcom[com "Select Buffer", bind (C-x b)] This command prompts for the name of a existing buffer and makes that buffer the @i[current buffer]. The newly selected buffer is displayed in the current window, and editing commands now edit the text in that buffer. Each buffer has its own point, thus the point will be in the place it was the last time the buffer was selected. When prompting for the buffer, the default is the buffer that was selected before the current one. @enddefcom @defcom[com "Select Previous Buffer", bind (C-M-l)] @defcom1[com "Circulate Buffers", bind (C-M-L)] With no prefix argument, @hid[Select Previous Buffer] selects the buffer that has been selected most recently, similar to @binding[C-x b Return]. If given a prefix argument, then it does the same thing as @hid[Circulate Buffers]. @hid[Circulate Buffers] moves back into successively earlier buffers in the buffer history. If the previous command was not @hid[Circulate Buffers] or @hid[Select Previous Buffer], then it does the same thing as @hid[Select Previous Buffer], otherwise it moves to the next most recent buffer. The original buffer at the start of the excursion is made the previous buffer, so @hid[Select Previous Buffer] will always take you back to where you started. These commands are generally used together. Often @hid[Select Previous Buffer] will take you where you want to go. If you don't end up there, then using @hid[Circulate Buffers] will do the trick. @enddefcom @defcom[com "Create Buffer", bind (C-x M-b)] This command is very similar to @hid[Select Buffer], but the buffer need not already exist. If the buffer does not exist, a new empty buffer is created with the specified name. @enddefcom @defcom[com "Kill Buffer", bind (C-x k)] This command is used to make a buffer go away. There is no way to restore a buffer that has been accidentally deleted, so the user is given a chance to save the hapless buffer if it has been modified. This command is poorly named, since it has nothing to do with killing text. @enddefcom @defcom[com "List Buffers", bind (C-x C-b)] This command displays a list of all existing buffers in a pop-up window. A "@f[*]" is displayed before the name of each modified buffer. A buffer with no associated file is represented by the buffer name followed by the number of lines in the buffer. A buffer with an associated file are is represented by the name and type of the file, a space, and the device and directory. If the buffer name doesn't match the associated file, then the buffer name is also displayed. When given a prefix argument, this command lists only the modified buffers. @enddefcom @defcom[com "Buffer Not Modified", bind (M-~)] This command resets the current buffer's modification flag @dash @i[it does not save any changes]. This is primarily useful in cases where a user accidentally modifies a buffer and then undoes the change. Resetting the modified flag indicates that the buffer has no changes that need to be written out. @enddefcom @defcom[com "Check Buffer Modified", bind (C-x ~)] This command displays a message indicating whether the current buffer is modified. @enddefcom @defcom[com "Set Buffer Read-Only"] This command changes the flag that allows the current buffer to be modified. If a buffer is read-only, any attempt to modify it will result in an error. The buffer may be made writable again by repeating this command. @enddefcom @defcom[com "Set Buffer Writable"] This command ensures the current buffer is modifiable. @enddefcom @defcom[com "Insert Buffer"] This command prompts for the name of a buffer and inserts its contents at the point, pushing a buffer mark before inserting. The buffer inserted is unaffected. @enddefcom @defcom[com "Rename Buffer"] This command prompts for a new name for the current buffer, which defaults to a name derived from the associated filename. @enddefcom @section[Files] @index[files] These commands either read a file into the current buffer or write it out to some file. Various other bookkeeping operations are performed as well. @defcom[com "Find File", bind (C-x C-f)] This is the command normally used to get a file into @hemlock. It prompts for the name of a file, and if that file has already been read in, selects that buffer; otherwise, it reads file into a new buffer whose name is derived from the name of the file. If the file does not exist, then the buffer is left empty, and @w<"@f[(New File)]"> is displayed in the echo area; the file may then be created by saving the buffer. The buffer name created is in the form @w<"@i[name] @i[type] @i[directory]">. This means that the filename "@f[/sys/emacs/teco.mid]" has @w<"@f[Teco Mid /Sys/Emacs/]"> as its the corresponding buffer name. The reason for rearranging the fields in this fashion is that it facilitates recognition since the components most likely to differ are placed first. If the buffer cannot be created because it already exists, but has another file in it (an unlikely occurrence), then the user is prompted for the buffer to use, as by @hid[Create Buffer]. @hid[Find File] takes special action if the file has been modified on disk since it was read into @hemlock. This usually happens when several people are simultaneously editing a file, an unhealthy circumstance. If the buffer is unmodified, @hid[Find File] just asks for confirmation before reading in the new version. If the buffer is modified, then @hid[Find File] beeps and prompts for a single key-event to indicate what action to take. It recognizes the following key-events: @begin[description] @binding[Return, Space, y]@\ Prompt for a file in which to save the current buffer and then read in the file found to be modified on disk. @binding[Delete, Backspace, n]@\ Forego reading the file. @binding[r]@\ Read the file found to be modified on disk into the buffer containing the earlier version with modifications. This loses all changes you had in the buffer. @end[description] @enddefcom @defcom[com "Save File", bind (C-x C-s)] This command writes the current buffer out to its associated file and resets the buffer modification flag. If there is no associated file, then the user is prompted for a file, which is made the associated file. If the buffer is not modified, then the user is asked whether to actually write it or not. If the file has been modified on disk since the last time it was read, @hid[Save File] prompts for confirmation before overwriting the file. @enddefcom @defcom[com "Save All Files", bind (C-x C-m)] @defcom1[com "Save All Files and Exit", bind (C-x M-z)] @defhvar1[var "Save All Files Confirm", val {t}] @hid[Save All Files] does a @hid[Save File] on all buffers which have an associated file. @hid[Save All Files and Exit] does the same thing and then exits @hemlock. When @hid[Save All Files Confirm] is true, these commands will ask for confirmation before saving a file. @enddefcom @defcom[com "Visit File", bind (C-x C-v)] This command prompts for a file and reads it into the current buffer, setting the associated filename. Since the old contents of the buffer are destroyed, the user is given a chance to save the buffer if it is modified. As for @hid[Find File], the file need not actually exist. This command warns if some other buffer also contains the file. @enddefcom @defcom[com "Write File", bind (C-x C-w)] This command prompts for a file and writes the current buffer out to it, changing the associated filename and resetting the modification flag. When the buffer's associated file is specified this command does the same thing as @hid[Save File]. @enddefcom @defcom[com "Backup File"] This command is similar to @hid[Write File], but it neither sets the associated filename nor clears the modification flag. This is useful for saving the current state somewhere else, perhaps on a reliable machine. Since @hid[Backup File] doesn't update the write date for the buffer, @hid[Find File] and @hid[Save File] will get all upset if you back up a buffer on any file that has been read into @hemlock. @enddefcom @defcom[com "Revert File"] @defhvar1[var "Revert File Confirm", val {t}] This command replaces the text in the current buffer with the contents of the associated file or the checkpoint file for that file, whichever is more recent. The point is put in approximately the same place that it was before the file was read. If the original file is reverted to, then clear the modified flag, otherwise leave it set. If a prefix argument is specified, then always revert to the original file, ignoring any checkpoint file. If the buffer is modified and @hid[Revert File Confirm] is true, then the user is asked for confirmation. @enddefcom @defcom[com "Insert File", bind (C-x C-r)] This command prompts for a file and inserts it at the point, pushing a buffer mark before inserting. @enddefcom @defcom[com "Write Region"] This command prompts for a file and writes the text in the region out to it. @enddefcom @defhvar[var "Add Newline at EOF on Writing File", val {:ask-user}] This variable controls whether some file writing commands add a newline at the end of the file if the last line is non-empty. @begin[description] @f[:ask-user]@\Ask the user whether to add a newline. @f[t]@\Automatically add a newline and inform the user. @nil@\Never add a newline and do not ask. @end[description] Some programs will lose the text on the last line or get an error when the last line does not have a newline at the end. @enddefhvar @defhvar[var "Keep Backup Files", val {nil}] Whenever a file is written by @hid[Save File] and similar commands, the old file is renamed by appending "@f[.BAK]" to the name, ensuring that some version of the file will survive a system crash during the write. If set to true, this backup file will not deleted even when the write successfully completes. @enddefhvar @subsection[Auto Save Mode] @hid[Save] mode protects against loss of work in system crashes by periodically saving modified buffers in checkpoint files. @defcom[com "Auto Save Mode"] This command turns on @hid[Save] mode if it is not on, and turns off when it is on. @hid[Save] mode is on by default. @enddefcom @defhvar[var "Auto Save Checkpoint Frequency", val {120}] @defhvar1[var "Auto Save Key Count Threshold", val {256}] These variables determine how often modified buffers in @hid[Save] mode will be checkpointed. Checkpointing is done after @hid[Auto Save Checkpoint Frequency] seconds, or after @hid[Auto Save Key Count Threshold] keystrokes that modify the buffer (whichever comes first). Either kind of checkpointing may be disabled by setting the corresponding variable to @nil. @enddefhvar @defhvar[var "Auto Save Cleanup Checkpoints", val {t}] If this variable is true, then any checkpoint file for a buffer will be deleted when the buffer is successfully saved in its associated file. @enddefhvar @defhvar[var "Auto Save Filename Pattern", val {"~A~A.CKP"}] @defhvar1[var "Auto Save Pathname Hook", val {make-unique-save-pathname}] These variables determine the naming of checkpoint files. @hid[Auto Save Filename Pattern] is a format string used to name the checkpoint files for buffers with associated files. Format is called with two arguments: the directory and file namestrings of the associated file. @hid[Auto Save Pathname Hook] is a function called by @hid[Save] mode to get a checkpoint pathname when there is no pathname associated with a buffer. It should take a buffer as its argument and return either a pathname or @nil. If a pathname is returned, then it is used as the name of the checkpoint file. If the function returns @nil, or if the hook variable is @nil, then @hid[Save] mode is turned off in the buffer. The default value for this variable returns a pathname in the default directory of the form "@w<@f[save-]@i[number]>", where @i[number] is a number used to make the file unique. @enddefhvar @subsection[Filename Defaulting and Merging] @index[merging, filename] @index[defaulting, filename] @index[filename defaulting] @label[merging] @index[pathnames] When @hemlock prompts for the name of a file, it always offers a default. Except for a few commands that have their own defaults, filename defaults are computed in a standard way. If it exists, the associated file for the current buffer is used as the default, otherwise a more complex mechanism creates a default. @defhvar[var "Pathname Defaults", val {(pathname "gazonk.del")}] @defhvar1[var "Last Resort Pathname Defaults Function"] @defhvar1[var "Last Resort Pathname Defaults", val {(pathname "gazonk")}] These variables control the computation of default filename defaults when the current buffer has no associated file. @hid[Pathname Defaults] holds a "sticky" filename default. Commands that prompt for files set this to the file specified, and the value is used as a basis for filename defaults. It is undesirable to offer the unmodified value as a default, since it is usually the name of an existing file that we don't want to overwrite. If the current buffer's name is all alphanumeric, then the default is computed by substituting the buffer name for the the name portion of @hid[Pathname Defaults]. Otherwise, the default is computed by calling @hid[Last Resort Pathname Defaults Function] with the buffer as an argument. The default value of @hid[Last Resort Pathname Defaults Function] merges @hid[Last Resort Pathname Defaults] with @hid[Pathname Defaults]. Unlike @hid[Pathname Defaults], @hid[Last Resort Pathname Defaults] is not modified by file commands, so setting it to a silly name ensures that real files aren't inappropriately offered as defaults. @enddefhvar When a default is present in the prompt for a file, @hemlock @i[merges] the given input with the default filename. The semantics of merging, described in the Common Lisp manual, is somewhat involved, but @hemlock has a few rules it uses: @begin[enumerate] If @hemlock can find the user's input as a file on the @f["default:"] search list, then it forgoes merging with the displayed default. Basically, the system favors the files in your current working directory over those found by merging with the defaults offered in the prompt. Merging comes in two flavors, just merge with the displayed default's directory or just merge with the displayed default's @f[file-namestring]. If the user only responds with a directory specification, without any name or type information, then @hemlock merges the default's @f[file-namestring]. If the user responds with any name or type information, then @hemlock only merges with the default's directory. Specifying relative directories in this second situation coordinates with the displayed defaults, not the current working directory. @end[enumerate] @subsection[Type Hooks and File Options] @index[mode comment] @index[type hooks] When a file is read either by @hid[Find File] or @hid[Visit File], @hemlock attempts to guess the correct mode in which to put the buffer, based on the file's @i[type] (the part of the filename after the last dot). Any default action may be overridden by specifying the mode in the file's @i[file options].@index[modes]@index[package] @label[file-options]@index[file options] The user specifies file options with a special syntax on the first line of a file. If the first line contains the string "@f[-*-]", then @hemlock interprets the text between the first such occurrence and the second, which must be contained in one line , as a list of @w{"@f<@i[option]: @i[value]>"} pairs separated by semicolons. The following is a typical example: @begin[programexample] ;;; -*- Mode: Lisp, Editor; Package: Hemlock -*- @end[programexample] These options are currently defined: @begin[description] Dictionary@\The argument is the filename of a spelling dictionary associated with this file. The handler for this option merges the argument with the name of this file. See @comref[Set Buffer Spelling Dictionary]. Log@\The argument is the name of the change log file associated with this file (see page @pageref[log-files]). The handler for this option merges the argument with the name of this file. Mode@\The argument is a comma-separated list of the names of modes to turn on in the buffer that the file is read into. Package@\The argument is the name of the package to be used for reading code in the file. This is only meaningful for Lisp code (see page @pageref[lisp-package].) Editor@\The handler for this option ignores its argument and turns on @hid[Editor] mode (see @comref[Editor Mode]). @end[description] If the option list contains no "@f[:]" then the entire string is used as the name of the major mode for the buffer. @defcom[com "Process File Options"] This command processes the file options in the current buffer as described above. This is useful when the options have been changed or when a file is created. @enddefcom @section[Windows] @index[windows] @hemlock windows display a portion of a buffer's text. See the section on @i[window groups], @ref[groups], for a discussion of managing windows on bitmap device. @defcom[com "New Window", bind (C-x C-n)] This command prompts users for a new window which they can place anywhere on the screen. This window is in its own group. This only works with bitmap devices. @enddefcom @defcom[com "Split Window", bind (C-x 2)] This command splits the current window roughly in half to make two windows. If the current window is too small to be split, the command signals a user error. @enddefcom @defcom[com "Next Window", bind (C-x n)] @defcom1[com "Previous Window", bind (C-x p)] These commands make the next or previous window the new current window, often changing the current buffer in the process. When a window is created, it is arbitrarily made the next window of the current window. The location of the next window is, in general, unrelated to that of the current window. @enddefcom @defcom[com "Delete Window", bind (C-x C-d, C-x d)] @defcom1[com "Delete Next Window", bind (C-x 1)] @hid[Delete Window] makes the current window go away, making the next window current. @hid[Delete Next Window] deletes the next window, leaving the current window unaffected. On bitmap devices, if there is only one window in the group, either command deletes the group, making some window in another group the current window. If there are no other groups, they signal a user error. @enddefcom @defcom[com "Go to One Window"] This command deletes all window groups leaving one with the @hid[Default Initial Window X], @hid[Default Initial Window Y], @hid[Default Initial Window Width], and @hid[Default Initial Window Height]. This remaining window retains the contents of the current window. @enddefcom @defcom[com "Line to Top of Window", bind (M-!)] @defcom1[com "Line to Center of Window", bind (M-#)] @index[scrolling]@hid[Line to Top of Window] scrolls the current window up until the current line is at the top of the screen. @hid[Line to Center of Window] attempts to scroll the current window so that the current line is vertically centered. @enddefcom @defcom[com "Scroll Next Window Down", bind (C-M-v)] @defcom1[com "Scroll Next Window Up", bind (C-M-V)] These commands are the same as @hid[Scroll Window Up] and @hid[Scroll Window Down] except that they operate on the next window. @enddefcom @defcom[com "Refresh Screen", bind {C-l}] This command refreshes all windows, which is useful if the screen got trashed, centering the current window about the current line. When the user supplies a positive argument, it scrolls that line to the top of the window. When the argument is negative, the line that far from the bottom of the window is moved to the bottom of the window. In either case when an argument is supplied, this command only refreshes the current window. @enddefcom @chap[Editing Documents] @index[documents, editing] Although @hemlock is not dedicated to editing documents as word processing systems are, it provides a number of commands for this purpose. If @hemlock is used in conjunction with a text-formatting program, then its lack of complex formatting commands is no liability. @defcom[com "Text Mode"] This commands puts the current buffer into "Text" mode. @enddefcom @section[Sentence Commands] @index[sentence commands] A sentence is defined as a sequence of characters ending with a period, question mark or exclamation point, followed by either two spaces or a newline. A sentence may also be terminated by the end of a paragraph. Any number of closing delimiters, such as brackets or quotes, may be between the punctuation and the whitespace. This somewhat complex definition of a sentence is used so that periods in abbreviations are not misinterpreted as sentence ends. @defcom[com "Forward Sentence", bind {M-a}] @defcom1[com "Backward Sentence", bind {M-e}] @index[motion, sentence]@hid[Forward Sentence] moves the point forward past the next sentence end. @hid[Backward Sentence] moves to the beginning of the current sentence. A prefix argument may be used as a repeat count. @enddefcom @defcom[com "Forward Kill Sentence", bind {M-k}] @defcom1[com "Backward Kill Sentence", bind (C-x Delete, C-x Backspace)] @index[killing, sentence]@hid[Forward Kill Sentence] kills text from the point through to the end of the current sentence. @hid[Backward Kill Sentence] kills from the point to the beginning of the current sentence. A prefix argument may be used as a repeat count. @enddefcom @defcom[com "Mark Sentence"] This command puts the point at the beginning and the mark at the end of the next or current sentence. @enddefcom @section[Paragraph Commands] @index[paragraph commands]A paragraph may be delimited by a blank line or a line beginning with "@f[']" or "@f[.]", in which case the delimiting line is not part of the paragraph. Other characters may be paragraph delimiters in some modes. A line with at least one leading whitespace character may also introduce a paragraph and is considered to be part of the paragraph. Any fill-prefix which is present on a line is disregarded for the purpose of locating a paragraph boundary. @defcom[com "Forward Paragraph", bind (@bf<M-]>)] @defcom1[com "Backward Paragraph", bind (M-[)] @index[motion, paragraph]@index[paragraph, motion]@hid[Forward Paragraph] moves to the end of the current or next paragraph. @hid[Backward Paragraph] moves to the beginning of the current or previous paragraph. A prefix argument may be used as a repeat count. @enddefcom @defcom[com "Mark Paragraph", bind {M-h}] This command puts the point at the beginning and the mark at the end of the current paragraph. @enddefcom @defhvar[var "Paragraph Delimiter Function", val {default-para-delim-function}] This variable holds a function that takes a mark as its argument and returns true when the line it points to should break the paragraph. @enddefhvar @section[Filling] @index[filling]@index[formatting]Filling is a coarse text-formatting process which attempts to make all the lines roughly the same length, but doesn't vary the amount of space between words. Editing text may leave lines with all sorts of strange lengths; filling this text will return it to a moderately aesthetic form. @defcom[com "Set Fill Column", bind (C-x f)] This command sets the fill column to the column that the point is currently at, or the one specified by the absolute value of prefix argument, if it is supplied. The fill column is the column past which no text is permitted to extend. @enddefcom @defcom[com "Set Fill Prefix", bind (C-x .)] This command sets the fill prefix to the text from the beginning of the current line to the point. The fill-prefix is a string which filling commands leave at the beginning of every line filled. This feature is useful for filling indented text or comments. @enddefcom @defhvar[var "Fill Column", val {75}] @defhvar1[var "Fill Prefix", val {nil}] These variables hold the value of the fill prefix and fill column, thus setting these variables will change the way filling is done. If @hid[Fill Prefix] is @nil, then there is no fill prefix. @enddefcom @defcom[com "Fill Paragraph", bind {M-q}] @index[paragraph, filling]This command fills the text in the current or next paragraph. The point is not moved. @enddefcom @defcom[com "Fill Region", bind {M-g}] @index[region, filling]This command fills the text in the region. Since filling can mangle a large quantity of text, this command asks for confirmation before filling a large region (see @hid[Region Query Size].) @enddefcom @defcom[com "Auto Fill Mode"] @index[modes, auto fill]This command turns on or off the @hid[Fill] minor mode in the current buffer. When in @hid[Fill] mode, @bf[Space], @bf[Return] and @bf[Linefeed] are rebound to commands that check whether the point is past the fill column and fill the current line if it is. This enables typing text without having to break the lines manually. If a prefix argument is supplied, then instead of toggling, the sign determines whether @hid[Fill] mode is turned off; a positive argument argument turns in on, and a negative one turns it off. @enddefcom @defcom[com "Auto Fill Linefeed", stuff (bound to @bf[Linefeed] in @hid[Fill] mode)] @defcom1[com "Auto Fill Return", stuff (bound to @bf[Return] in @hid[Fill] mode)] @hid[Auto Fill Linefeed] fills the current line if it needs it and then goes to a new line and inserts the fill prefix. @hid[Auto Fill Return] is similar, but does not insert the fill prefix on the new line. @enddefcom @defcom[com "Auto Fill Space", stuff (bound to @bf[Space] in @hid[Fill] mode)] If no prefix argument is supplied, this command inserts a space and fills the current line if it extends past the fill column. If the argument is zero, then it fills the line if needed, but does not insert a space. If the argument is positive, then that many spaces are inserted without filling. @enddefcom @defhvar[var "Auto Fill Space Indent", val {nil}] This variable determines how lines are broken by the auto fill commands. If it is true, new lines are created using the @hid[Indent New Comment Line] command, otherwise the @hid[New Line] command is used. Language modes should define this variable to be true so that auto fill mode can be used on code. @enddefhvar @section[Scribe Mode] @hid[Scribe] mode provides a number of facilities useful for editing Scribe documents. It is also sufficiently parameterizable to be adapted to other similar syntaxes. @defcom[com "Scribe Mode"] @index[modes, scribe]This command puts the current buffer in @hid[Scribe] mode. Except for special Scribe commands, the only difference between @hid[Scribe] mode and @hid[Text] mode is that the rules for determining paragraph breaks are different. In @hid[Scribe] mode, paragraphs delimited by Scribe commands are normally placed on their own line, in addition to the normal paragraph breaks. The main reason for doing this is that it prevents @hid[Fill Paragraph] from mashing these commands into the body of a paragraph. @enddefcom @defcom[com "Insert Scribe Directive", stuff (@bf[C-h] in @hid[Scribe] mode)] This command prompts for a key-event to determine which Scribe directive to insert. Directives are inserted differently depending on their kind: @begin[description] @i[environment]@\ The current or next paragraph is enclosed in a begin-end pair: @f<@@begin[@i{directive}]> @i[paragraph] @f<@@end[@i{directive}]>. If the current region is active, then this command encloses the region instead of the paragraph it would otherwise chose. @i[command]@\ The previous word is enclosed by @f<@@@i[directive][@i[word]]>. If the previous word is already enclosed by a use of the same command, then the beginning of the command is extended backward by one word. @end[description] Typing @bf[Home] or @bf[C-_] to this command's prompt will display a list of all the defined key-events on which it dispatches. @enddefcom @defcom[com "Add Scribe Directive"] This command adds to the database of directives recognized by the @hid[Insert Scribe Directive] command. It prompts for the directive's name, the kind of directive (environment or command) and the key-event on which to dispatch. @enddefcom @defcom[com "Add Scribe Paragraph Delimiter"] @defcom1[com "List Scribe Paragraph Delimiters"] @hid[Add Scribe Paragraph Delimiter] prompts for a string to add to the list of formatting commands that delimit paragraphs in @hid[Scribe] mode. If the user supplies a prefix argument, then this command removes the string as a delimiter. @hid[List Scribe Paragraph Delimiters] displays in a pop-up window the Scribe commands that delimit paragraphs. @enddefcom @defhvar[var "Escape Character", val {#\@@}] @defhvar1[var "Close Paren Character", val {#\]}] @defhvar1[var "Open Paren Character", val {#\[}] These variables determine the characters used when a Scribe directive is inserted. @enddefhvar @defcom[com "Scribe Insert Bracket"] @defhvar1[var "Scribe Bracket Table"] @hid[Scribe Insert Bracket] inserts a bracket (@bf[>], @bf[}], @bf[)], or @bf<]>), that caused its invocation, and then shows the matching bracket. @hid[Scribe Bracket Table] holds a @f[simple-vector] indexed by character codes. If a character is a bracket, then the entry for its @f[char-code] should be the opposite bracket. If a character is not a bracket, then the entry should be @nil. @enddefcom @section[Spelling Correction] @index[spelling correction] @hemlock has a spelling correction facility based on the dictionary for the ITS spell program. This dictionary is fairly small, having only 45,000 word or so, which means it fits on your disk, but it also means that many reasonably common words are not in the dictionary. A correct spelling for a misspelled word will be found if the word is in the dictionary and is only erroneous in that it has a wrong character, a missing character, an extra character or a transposition of two characters. @defcom[com "Check Word Spelling", bind (M-$)] This command looks up the previous or current word in the dictionary and attempts to correct the spelling if it is misspelled. There are four possible results of invoking this command: @begin[enumerate] This command displays the message "@f[Found it.]" in the echo area. This means it found the word in the dictionary exactly as given. This command displays the message "@f[Found it because of @i[word].]", where @i[word] is some other word with the same root but a different ending. The word is no less correct than if the first message is given, but an additional piece of useless information is supplied to make you feel like you are using a computer. The command prompts with "@f[Correction choice:]" in the echo area and lists possible correct spellings associated with numbers in a pop-up display. Typing a number selects the corresponding correction, and the command replaces the erroneous word, preserving case as though by @hid[Query Replace]. Typing anything else rejects all the choices. This commands displays the message "@f[Word not found.]". The word is not in the dictionary and possibly spelled correctly anyway. Furthermore, no similarly spelled words were found to offer as possible corrections. If this happens, it is worth trying some alternate spellings since one of them might be close enough to some known words that this command could display. @end[enumerate] @enddefcom @defcom[com "Correct Buffer Spelling"] This command scans the entire buffer looking for misspelled words and offers to correct them. It creates a window into the @hid[Spell Corrections] buffer, and in this buffer it maintains a log of any actions taken by the user. When this finds an unknown word, it prompts for a key-event. The user has the following options: @begin[description] @bf[a]@\ Ignore this word. If the command finds the word again, it will prompt again. @bf[i]@\ Insert this word in the dictionary. @bf[c]@\ Choose one of the corrections displayed in the @hid[Spell Corrections] window by specifying the correction number. If the same misspelling is encountered again, then the command will make the same correction automatically, leaving a note in the log window. @bf[r]@\ Prompt for a word to use instead of the misspelled one, remembering the correction as with @bf[c]. @binding[C-r]@\ Go into a recursive edit at the current position, and resume checking when the recursive edit is exited. @end[description] After this command completes, it deletes the log window leaving the buffer around for future reference. @enddefcom @defhvar[var "Spell Ignore Uppercase", val {nil}] @index[case sensitivity] If this variable is true, then @hid[Auto Check Word Spelling] and @hid[Correct Buffer Spelling] will ignore unknown words that are all uppercase. This is useful for acronyms and cryptic formatter directives. @enddefhvar @defcom[com "Add Word to Spelling Dictionary", bind (C-x $)] This command adds the previous or current word to the spelling dictionary. @enddefcom @defcom[com "Remove Word from Spelling Dictionary"] This command prompts for a word to remove from the spelling dictionary. Due to the dictionary representation, removal of a word in the initial spelling dictionary will remove all words with the same root. The user is asked for confirmation before removing a root word with valid suffix flags. @enddefcom @defcom[com "List Incremental Spelling Insertions"] This command displays the incremental spelling insertions for the current buffer's associated spelling dictionary file. @enddefcom @defcom[com "Read Spelling Dictionary"] This command adds some words from a file to the spelling dictionary. The format of the file is a list of words, one on each line. @enddefcom @defcom[com "Save Incremental Spelling Insertions"] This command appends incremental dictionary insertions to a file. Any words added to the dictionary since the last time this was done will be appended to the file. Except for @hid[Augment Spelling Dictionary], all the commands that add words to the dictionary put their insertions in this list. The file is prompted for unless @hid[Set Buffer Spelling Dictionary] has been executed in the buffer. @enddefcom @defcom[com "Set Buffer Spelling Dictionary"] This command Prompts for the dictionary file to associate with the current buffer. If the specified dictionary file has not been read for any other buffer, then it is read. Incremental spelling insertions from this buffer can be appended to this file with @hid[Save Incremental Spelling Insertions]. If a buffer has an associated spelling dictionary, then saving the buffer's associated file also saves any incremental dictionary insertions. The @w<"@f[Dictionary: ]@i[file]"> file option may also be used to specify the dictionary for a buffer (see section @ref[file-options]). @enddefcom @defhvar[var "Default User Spelling Dictionary", val {nil}] This variable holds the pathname of a dictionary to read the first time @hid[Spell] mode is entered in a given editing session. When @hid[Set Buffer Spelling Dictionary] or the "@f[dictionary]" file option is used to specify a dictionary, this default one is read also. It defaults to nil. @enddefhvar @subsection[Auto Spell Mode] @hid[Auto Spell Mode] checks the spelling of each word as it is typed. When an unknown word is typed the user is notified and allowed to take a number of actions to correct the word. @defcom[com "Auto Spell Mode"] This command turns @hid[Spell] mode on or off in the current buffer. @enddefcom @defcom[com "Auto Check Word Spelling", stuff (bound to word delimiters in @hid[Spell] mode)] @defhvar1[var "Check Word Spelling Beep", val {t}] @defhvar1[var "Correct Unique Spelling Immediately", val {t}] This command checks the spelling of the word before the point, doing nothing if the word is in the dictionary. If the word is misspelled but has a known correction previously supplied by the user, then this command corrects the spelling. If there is no correction, then this displays a message in the echo area indicating the word is unknown. An unknown word detected by this command may be corrected using the @hid[Correct Last Misspelled Word] command. This command executes in addition to others bound to the same key; for example, if @hid[Fill] mode is on, any of its commands bound to the same keys as this command also run. If @hid[Check Word Spelling Beep] is true, then this command will beep when an unknown word is found. If @hid[Correct Unique Spelling Immediately] is true, then this command will immediately attempt to correct any unknown word, automatically making the correction if there is only one possible. @enddefhvar @defcom[com "Undo Last Spelling Correction", bind (C-x a)] @defhvar1[var "Spelling Un-Correct Prompt for Insert", val {nil}] @hid[Undo Last Spelling Correction] undoes the last incremental spelling correction. The "correction" is replaced with the old word, and the old word is inserted in the dictionary. Any automatic replacement for the old word is eliminated. When @hid[Spelling Un-Correct Prompt for Insert] is true, the user is asked to confirm the insertion into the dictionary. @enddefcom @defcom[com "Correct Last Misspelled Word", bind (M-:)] This command places the cursor after the last misspelled word detected by the @hid[Auto Check Word Spelling] command and then prompts for a key-event on which it dispatches: @begin[description] @bf[c]@\ Display possible corrections in a pop-up window, and prompt for the one to make according to the corresponding displayed digit or letter. @i[any digit]@\ Similar to @bf[c] @i[digit], but immediately makes the correction, dispensing with display of the possible corrections. This is shorter, but only works when there are less than ten corrections. @bf[i]@\ Insert the word in the dictionary. @bf[r]@\ Replace the word with another. @binding[Backspace, Delete, n]@\ Skip this word and try again on the next most recently misspelled word. @binding[C-r]@\ Enter a recursive edit at the word, exiting the command when the recursive edit is exited. @binding[Escape]@\ Exit and forget about this word. @end[description] As in @hid[Correct Buffer Spelling], the @bf[c] and @bf[r] commands add the correction to the known corrections. @enddefcom @chap[Managing Large Systems] @hemlock provides three tools which help to manage large systems: @begin[enumerate] File groups, which provide several commands that operate on all the files in a possibly large collection, instead of merely on a single buffer. A source comparison facility with semi-automatic merging, which can be used to compare and merge divergent versions of a source file. A change log facility, which maintains a single file containing a record of the edits done on a system. @end[enumerate] @section[File Groups] @index[file groups]@index[searching, group]@index[replacing, group] A file group is a set of files, upon which various editing operations can be performed. The files in a group are specified by a file in the following format: @begin[itemize] Any line which begins with one "@f[@@]" is ignored. Any line which does not begin with an "@f[@@]" is the name of a file in the group. A line which begins with "@f[@@@@]" specifies another file having this syntax, which is recursively examined to find more files in the group. @end[itemize] This syntax is used for historical reasons. Although any number of file groups may be read into @hemlock, there is only one @i[active group], which is the file group implicitly used by all of the file group commands. Page @pageref[compile-group-command] describes the @hid[Compile Group] command. @defcom[com "Select Group"] This command prompts for the name of a file group to make the active group. If the name entered is not the name of a group whose definition has been read, then the user is prompted for the name of a file to read the group definition from. The name of the default pathname is the name of the group, and the type is "@f[upd]". @enddefcom @defcom[com "Group Query Replace"] This command prompts for target and replacement strings and then executes an interactive string replace on each file in the active group. This reads in each file as if @hid[Find File] were used and processes it as if @hid[Query Replace] were executing. @enddefcom @defcom[com "Group Replace"] This is like @hid[Group Query Replace] except that it executes a non-interactive replacement, similar to @hid[Replace String]. @enddefcom @defcom[com "Group Search"] This command prompts for a string and then searches for it in each file in the active group. This reads in each file as if @hid[Find File] were used. When it finds an occurrence, it prompts the user for a key-event indicating what action to take. The following commands are defined: @begin[description] @binding[Escape, Space, y]@\ Exit @hid[Group Search]. @binding[Delete, Backspace, n]@\ Continue searching for the next occurrence of the string. @binding[!]@\ Continue the search at the beginning of the next file, skipping the remainder of the current file. @binding[C-r]@\ Go into a recursive edit at the current location, and continue the search when it is exited. @end[description] @enddefcom @defhvar[var "Group Find File", val {nil}] The group searching and replacing commands read each file into its own buffer using @hid[Find File]. Since this may result in large amounts of memory being consumed by unwanted buffers, this variable controls whether to delete the buffer after processing it. When this variable is false, the default, the commands delete the buffer if it did not previously exist; however, regardless of this variable, if the user leaves the buffer modified, the commands will not delete it. @enddefhvar @defhvar[var "Group Save File Confirm", val {t}] If this variable is true, the group searching and replacing commands ask for confirmation before saving any modified file. The commands attempt to save each file processed before going on to the next one in the group. @enddefhvar @section[Source Comparison] @index[buffer, merging] @index[buffer, comparison] @index[source comparison] These commands can be used to find exactly how the text in two buffers differs, and to generate a new version that combines features of both versions. @defhvar[var "Source Compare Default Destination", val {"Differences"}] This is a sticky default buffer name to offer when comparison commands prompt for a buffer in which to insert the results. @enddefhvar @defcom[com "Compare Buffers"] This command prompts for three buffers and then does a buffer comparison. The first two buffers must exist, as they are the buffers to be compared. The last buffer, which is created if it does not exist, is the buffer to which output is directed. The output buffer is selected during the comparison so that its progress can be monitored. There are various variables that control exactly how the comparison is done. If a prefix argument is specified, then only only the lines in the the regions of the two buffers are compared. @enddefcom @defcom[com "Buffer Changes"] This command compares the contents of the current buffer with the disk version of the associated file. It reads the file into the buffer @hid[Buffer Changes File], and generates the comparison in the buffer @hid[Buffer Changes Result]. As with @hid[Compare Buffers], the output buffer is displayed in the current window. @enddefcom @defcom[com "Merge Buffers"] This command functions in a very similar fashion to @hid[Compare Buffers], the difference being that a version which is a combination of the two buffers being compared is generated in the output buffer. This copies text that is identical in the two comparison buffers to the output buffer. When it encounters a difference, it displays the two differing sections in the output buffer and prompts the user for a key-event indicating what action to take. The following commands are defined: @begin[description] @bf[1]@\ Use the first version of the text. @bf[2]@\ Use the second version. @bf[b]@\ Insert the string @w<"@f[**** MERGE LOSSAGE ****]"> followed by both versions. This is useful if the differing sections are too complex, or it is unclear which is the correct version. If you cannot make the decision conveniently at this point, you can later search for the marking string above. @binding[C-r]@\ Do a recursive edit and ask again when the edit is exited. @end[description] @enddefcom @defhvar[var "Source Compare Ignore Case", val {nil}] @index[case sensitivity] If this variable is non-@nil, @hid[Compare Buffers] and @hid[Merge Buffers] will do comparisons case-insensitively. @enddefhvar @defhvar[var "Source Compare Ignore Indentation", val {nil}] If this variable is non-@nil, @hid[Compare Buffers] and @hid[Merge Buffers] ignore initial whitespace when comparing lines. @enddefhvar @defhvar[var "Source Compare Ignore Extra Newlines", val {t}] If this variable is true, @hid[Compare Buffers] and @hid[Merge Buffers] will treat all groups of newlines as if they were a single newline. @enddefhvar @defhvar[var "Source Compare Number of Lines", val {3}] This variable controls the number of lines @hid[Compare Buffers] and @hid[Merge Buffers] will compare when resynchronizing after a difference has been encountered. @enddefhvar @section[Change Logs] @label[log-files] @index[edit history] @index[change log] The @hemlock change log facility encourages the recording of changes to a system by making it easy to do so. The change log is kept in a separate file so that it doesn't clutter up the source code. The name of the log for a file is specified by the @f[Log] file option (see page @pageref[file-options].) @defcom[com "Log Change"] @defhvar1[var "Log Entry Template"] @hid[Log Change] makes a new entry in the change log associated with the file. Any changes in the current buffer are saved, and the associated log file is read into its own buffer. The name of the log file is determined by merging the name specified in the @f[Log] option with the current buffer's file name, so it is not usually necessary to put the full name there. After inserting a template for the log entry at the beginning of the buffer, the command enters a recursive edit (see page @pageref[recursive-edits]) so that the text of the entry may be filled in. When the user exits the recursive edit, the log file is saved. The variable @hid[Log Entry Template] determines the format of the change log entry. Its value is a @clisp @f[format] control string. The format string is passed three string arguments: the full name of the file, the creation date for the file and the name of the file author. If the creation date is not available, the current date is used. If the author is not available then @nil is passed. If there is an @f[@@] in the template, then it is deleted and the point is left at that position. @enddefcom @comment[@chap (Special Modes)] @include(special-modes) @chap[Editing Programs] @section[Comment Manipulation] @index[comment manipulation] @hemlock has commenting commands which can be used in almost any language. The behavior of these commands is determined by several @hemlock variables which language modes should define appropriately. @defcom[com "Indent for Comment", bind (M-;)] @index[indentation, comment]@label[comment-indentation] This is the most basic commenting command. If there is already a comment on the current line, then this moves the point to the start of the comment. If there no comment, this creates an empty one. This command normally indents the comment to start at @hid[Comment Column]. The comment indents differently in the following cases: @begin[enumerate] If the comment currently starts at the beginning of the line, or if the last character in the @hid[Comment Start] appears three times, then the comment remains unmoved. If the last character in the @hid[Comment Start] appears two times, then the comment is indented like a line of code. If text on the line prevents the comment occurring in the desired position, this places the comment at the end of the line, separated from the text by a space. @end[enumerate] Although the rules about replication in the comment start are oriented toward Lisp commenting styles, you can exploit these properties in other languages. When given a prefix argument, this command indents any existing comment on that many consecutive lines. This is useful for fixing up the indentation of a group of comments. @enddefcom @defcom[com "Indent New Comment Line", bind {M-j, M-Linefeed}] This commend ends the current comment and starts a new comment on a blank line, indenting the comment the same way that @hid[Indent for Comment] does. When not in a comment, this command is the same as @hid[Indent New Line]. @enddefcom @defcom[com "Up Comment Line", bind {M-p}] @defcom1[com "Down Comment Line", bind {M-n}] These commands are similar to @hid[Previous Line] or @hid[Next Line] followed by @hid[Indent for Comment]. Any empty comment on the current line is deleted before moving to the new line. @enddefcom @defcom[com "Kill Comment", bind (C-M-;)] This command kills any comment on the current line. When given a prefix argument, it kills comments on that many consecutive lines. @hid[Undo] will restore the unmodified text. @enddefcom @defcom[com "Set Comment Column", bind (C-x ;)] This command sets the comment column to its prefix argument. If used without a prefix argument, it sets the comment column to the column the point is at. @enddefcom @defhvar[var "Comment Start", val {nil}] @defhvar1[var "Comment End", val {nil}] @defhvar1[var "Comment Begin", val {nil}] @defhvar1[var "Comment Column", val {0}] These variables determine the behavior of the comment commands. @begin[description] @hid[Comment Start]@\The string which indicates the start of a comment. If this is @nil, then there is no defined comment syntax. @hid[Comment End]@\The string which ends a comment. If this is @nil, then the comment is terminated by the end of the line. @hid[Comment Begin]@\The string inserted to begin a new comment. @hid[Comment Column]@\The column that normal comments start at. @end[description] @enddefcom @section[Indentation] @label[indentation] @index[indentation] Nearly all programming languages have conventions for indentation or leading whitespace at the beginning of lines. The @hemlock indentation facility is integrated into the command set so that it interacts well with other features such as filling and commenting. @defcom[com "Indent", bind (Tab, C-i)] This command indents the current line. With a prefix argument, indents that many lines and moves down. Exactly what constitutes indentation depends on the current mode (see @hid[Indent Function]). @enddefcom @defcom[com "Indent New Line", bind (Linefeed)] This command starts a new indented line. Deletes any whitespace before the point and inserts indentation on a blank line. The effect of this is similar to @binding[Return] followed by @binding[Tab]. The prefix argument is passed to @hid[New Line], which is used to insert the blank line. @enddefcom @defcom[com "Indent Region", bind (C-M-\)] This command indents every line in the region. It may be undone with @hid[Undo]. @enddefcom @defcom[com "Back to Indentation", bind {M-m, C-M-m}] @index[motion, indentation] This command moves point to the first non-whitespace character on the current line. @enddefcom @defcom[com "Delete Indentation", bind (M-^, C-M-^)] @hid[Delete Indentation] joins the current line with the previous one, deleting excess whitespace. This operation is the inverse of the @bf[Linefeed] command in most modes. Usually this leaves one space between the two joined lines, but there are several exceptions. The non-whitespace immediately surrounding the deleted line break determine the amount of space inserted. @begin[enumerate] If the preceding character is an "@f[(]" or the following character is a "@f[)]", then this inserts no space. If the preceding character is a newline, then this inserts no space. This will happen if the previous line was blank. If the preceding character is a sentence terminator, then this inserts two spaces. @end[enumerate] When given a prefix argument, this command joins the current and next lines, rather than the previous and current lines. @enddefcom @defcom[com "Quote Tab", bind (M-Tab)] This command inserts a tab character. @enddefcom @defcom[com "Indent Rigidly", bind (C-x Tab, C-x C-i)] This command changes the indentation of all the lines in the region. Each line is moved to the right by the number of spaces specified by the prefix argument, which defaults to eight. A negative prefix argument moves lines left. @enddefcom @defcom[com "Center Line"] This indents the current line so that it is centered between the left margin and @hvarref[Fill Column]. If a prefix argument is supplied, then it is used as the width instead of @hid[Fill Column]. @enddefcom @defhvar[var "Indent Function", val {tab-to-tab-stop}] The value of this variable determines how indentation is done, and it is a function which is passed a mark as its argument. The function should indent the line which the mark points to. The function may move the mark around on the line. The mark will be @f[:left-inserting]. The default simply inserts a tab character at the mark. @enddefhvar @defhvar[var "Indent with Tabs", val {indent-using-tabs}] @defhvar1[var "Spaces per Tab", val {8}] @hid[Indent with Tabs] holds a function that takes a mark and a number of spaces. The function will insert a maximum number of tabs and a minimum number of spaces at mark to move the specified number of columns. The default definition uses @hid[Spaces per Tab] to determine the size of a tab. @i[Note,] @hid[Spaces per Tab] @i[is not used everywhere in @hemlock yet, so changing this variable could have unexpected results.] @enddefhvar @section[Language Modes] @hemlock@comment{}'s language modes are currently fairly crude, but probably provide better programming support than most non-extensible editors. @defcom[com "Pascal Mode"] @index[indentation, pascal]@index[modes, pascal]This command sets the current buffer's major mode to @hid[Pascal]. @hid[Pascal] mode borrows parenthesis matching from Scribe mode and indents lines under the previous line. @enddefcom @chap[Editing Lisp] @index[lisp, editing] @hemlock provides a large number of powerful commands for editing Lisp code. It is possible for a text editor to provide a much higher level of support for editing Lisp than ordinary programming languages, since its syntax is much simpler. @section[Lisp Mode] @index[lisp mode] @index[modes, lisp] @hid[Lisp] mode is a major mode used for editing Lisp code. Although most Lisp specific commands are globally bound, @hid[Lisp] mode is necessary to enable Lisp indentation, commenting, and parenthesis-matching. Whenever the user or some @hemlock mechanism turns on @hid[Lisp] mode, the mode's setup includes locally setting @hid[Current Package] (see section @ref[lisp-package]) in that buffer if its value is non-existent there; the value used is @f["USER"]. @defcom[com "Lisp Mode"] This command sets the major mode of the current buffer to @hid[Lisp]. @enddefcom @section[Form Manipulation] @index[form manipulation] These commands manipulate Lisp forms, the printed representations of Lisp objects. A form is either an expression balanced with respect to parentheses or an atom such as a symbol or string. @defcom[com "Forward Form", bind (C-M-f)] @defcom1[com "Backward Form", bind (C-M-b)] @index[motion, form]@hid[Forward Form] moves to the end of the current or next form, while @hid[Backward Form] moves to the beginning of the current or previous form. A prefix argument is treated as a repeat count. @enddefcom @defcom[com "Forward Kill Form", bind (C-M-k)] @defcom1[com "Backward Kill Form", bind (C-M-Delete, C-M-Backspace)] @index[killing, form]@hid[Forward Kill Form] kills text from the point to the end of the current form. If at the end of a list, but inside the close parenthesis, then kill the close parenthesis. @hid[Backward Kill Form] is the same, except it goes in the other direction. A prefix argument is treated as a repeat count. @enddefcom @defcom[com "Mark Form", bind (C-M-@@)] This command sets the mark at the end of the current or next form. @enddefcom @defcom[com "Transpose Forms", bind (C-M-t)] This command transposes the forms before and after the point and moves forward. A prefix argument is treated as a repeat count. If the prefix argument is negative, then the point is moved backward after the transposition is done, reversing the effect of the equivalent positive argument. @enddefcom @defcom[com "Insert ()", bind {M-(}] This command inserts an open and a close parenthesis, leaving the point inside the open parenthesis. If a prefix argument is supplied, then the close parenthesis is put at the end of the form that many forms from the point. @enddefcom @defcom[com "Extract Form"] This command replaces the current containing list with the next form. The entire affected area is pushed onto the kill ring. If an argument is supplied, that many upward levels of list nesting is replaced by the next form. This is similar to @hid[Extract List], but this command is more generally useful since it works on any kind of form; it is also more intuitive since it operates on the next form as many @hid[Lisp] mode commands do. @enddefcom @section[List Manipulation] @index[list manipulation]List commands are similar to form commands, but they only pay attention to lists, ignoring any atomic objects that may appear. These commands are useful because they can skip over many symbols and move up and down in the list structure. @defcom[com "Forward List", bind (C-M-n)] @defcom1[com "Backward List", bind (C-M-p)] @index[motion, list]@hid[Forward List] moves the point to immediately after the end of the next list at the current level of list structure. If there is not another list at the current level, then it moves up past the end of the containing list. @hid[Backward List] is identical, except that it moves backward and leaves the point at the beginning of the list. The prefix argument is used as a repeat count. @enddefcom @defcom[com "Forward Up List", bind {C-M-@bf<)>}] @defcom1[com "Backward Up List", bind (C-M-@bf<(>, C-M-u)] @hid[Forward Up List] moves to after the end of the enclosing list. @hid[Backward Up List] moves to the beginning. The prefix argument is used as a repeat count. @enddefcom @defcom[com "Down List", bind (C-M-d)] This command moves to just after the beginning of the next list. The prefix argument is used as a repeat count. @enddefcom @defcom[com "Extract List", bind (C-M-x)] This command "extracts" the current list from the list which contains it. The outer list is deleted, leaving behind the current list. The entire affected area is pushed on the kill ring, so that this possibly catastrophic operation can be undone. The prefix argument is used as a repeat count. @enddefcom @section[Defun Manipulation] @index[defun manipulation]A @i[defun] is a list whose open parenthesis is against the left margin. It is called this because an occurrence of the @f[defun] top level form usually satisfies this definition, but other top level forms such as a @f[defstruct] and @f[defmacro] work just as well. @defcom[com "End of Defun", bind (@bf<C-M-e, C-M-]>)] @defcom1[com "Beginning of Defun", bind (C-M-a, C-M-[)] @index[motion, defun]@hid[End of Defun] moves to the end of the current or next defun. @hid[Beginning of Defun] moves to the beginning of the current or previous defun. @hid[End of Defun] will not work if the parentheses are not balanced. @enddefcom @defcom[com "Mark Defun", bind (C-M-h)] This command puts the point at the beginning and the mark at the end of the current or next defun. @enddefcom @section[Indentation] @index[indentation, lisp] One of the most important features provided by @hid[Lisp] mode is automatic indentation of Lisp code. Since unindented Lisp is unreadable, poorly indented Lisp is hard to manage, and inconsistently indented Lisp is subtly misleading. See section @ref[indentation] for a description of the general-purpose indentation commands. @hid[Lisp] mode uses these indentation rules: @begin[itemize] If in a semicolon (@f[;]) comment, then use the standard comment indentation rules. See page @pageref[comment-indentation]. If in a quoted string, then indent to the column one greater than the column containing the opening double quote. This is exactly what you want in function documentation strings and wrapping @f[error] strings. If there is no enclosing list, then use no indentation. If enclosing list resembles a call to a known macro or special-form, then the first few arguments are given greater indentation and the first body form is indented two spaces. If the first special argument is on the same line as the beginning of the form, then following special arguments will be indented to the start of the first special argument, otherwise all special arguments are indented four spaces. If the previous form starts on its own line, then the indentation is copied from that form. This rule allows the default indentation to be overridden: once a form has been manually indented to the user's satisfaction, subsequent forms will be indented in the same way. If the enclosing list has some arguments on the same line as the form start, then subsequent arguments will be indented to the start of the first argument. If the enclosing list has no argument on the same line as the form start, then arguments will be indented one space. @end[itemize] @defcom[com "Indent Form", bind (C-M-q)] This command indents all the lines in the current form, leaving the point unmoved. This is undo-able. @enddefcom @defcom[com "Fill Lisp Comment Paragraph", stuff <bound to @bf[M-q] in @hid[Lisp] mode>] @defhvar1[var "Fill Lisp Comment Paragraph Confirm", val {t}] This fills a flushleft or indented Lisp comment. This also fills Lisp string literals using the proper indentation as a filling prefix. When invoked outside of a comment or string, this tries to fill all contiguous lines beginning with the same initial, non-empty blankspace. When filling a comment, the current line is used to determine a fill prefix by taking all the initial whitespace on the line, the semicolons, and any whitespace following the semicolons. When invoked outside of a comment or string, this command prompts for confirmation before filling. It is useful to use this for filling long @f[export] lists or other indented text or symbols, but since this is a less common use, this command tries to make sure that is what you wanted. Setting @hid[Fill Lisp Comment Paragraph Confirm] to @nil inhibits the confirmation prompt. @enddefcom @defcom[com "Defindent", bind (C-M-#)] This command prompts for the number of special arguments to associate with the symbol at the beginning of the current or containing list. @enddefcom @defhvar[var "Indent Defanything", val {2}] This is the number of special arguments implicitly assumed to be supplied in calls to functions whose names begin with "@f[def]". If set to @nil, this feature is disabled. @enddefhvar @defcom[com "Move Over )", bind {M-)}] This command moves past the next close parenthesis and then does the equivalent of @hid[Indent New Line]. @enddefcom @section[Parenthesis Matching] @index[parenthesis matching]Another very important facility provided by @hid[Lisp] mode is @i[parenthesis matching]. Two different styles of parenthesis matching are supported: highlighting and pausing. @defhvar[var "Highlight Open Parens", val {t}] @defhvar1[var "Open Paren Highlighting Font", val {nil}] When @hid[Highlight Open Parens] is true, and a close paren is immediately before the point, then @hemlock displays the matching open paren in @hid[Open Paren Highlighting Font]. @hid[Open Paren Highlighting Font] is the string name of the font used for paren highlighting. Only the "@f[(]" character is used in this font. If null, then a reasonable default is chosen. The highlighting font is read at initialization time, so this variable must be set before the editor is first entered to have any effect. @enddefhvar @defcom[com "Lisp Insert )", stuff <bound to @bf[)] in @hid[Lisp] mode>] @defhvar1[var "Paren Pause Period", val {0.5}] This command inserts a close parenthesis and then attempts to display the matching open parenthesis by placing the cursor on top of it for @hid[Paren Pause Period] seconds. If there is no matching parenthesis then beep. If the matching parenthesis is off the top of the screen, then the line on which it appears is displayed in the echo area. Paren pausing may be disabled by setting @hid[Paren Pause Period] to @nil. @enddefcom The initial values shown for @hid[Highlight Open Parens] and @hid[Paren Pause Period] are only approximately correct. Since paren highlighting is only meaningful in Lisp mode, @hid[Highlight Open Parens] is false globally, and has a mode-local value of @true in Lisp mode. It it redundant to do both kinds of paren matching, so there is also a binding of @hid[Paren Pause Period] to @false in Lisp mode. Paren highlighting is only supported under @windows, so the above defaults are conditional on the device type. If @hemlock is started on a terminal, the initialization code makes Lisp mode bindings of @false and @f[0.5] for @hid[Highlight Open Parens] and @hid[Paren Pause Period]. Since these alternate default bindings are made at initialization time, the only way to affect them is to use the @f[after-editor-initializations] macro. @section[Parsing Lisp] Lisp mode has a fairly complete knowledge of Lisp syntax, but since it does not use the reader, and must work incrementally, it can be confused by legal constructs. Lisp mode totally ignores the read-table, so user-defined read macros have no effect on the editor. In some cases, the values the @hid[Lisp Syntax] character attribute can be changed to get a similar effect. Lisp commands consistently treat semicolon (@f[;]) style comments as whitespace when parsing, so a Lisp command used in a comment will affect the next (or previous) form outside of the comment. Since @f[#| ... |#] comments are not recognized, they can used to comment out code, while still allowing Lisp editing commands to be used. Strings are parsed similarly to symbols. When within a string, the next form is after the end of the string, and the previous form is the beginning of the string. @defhvar[var "Defun Parse Goal", val {2}] @defhvar1[var "Maximum Lines Parsed", val {500}] @defhvar1[var "Minimum Lines Parsed", val {50}] In order to save time, Lisp mode does not parse the entire buffer every time a Lisp command is used. Instead, it uses a heuristic to guess the region of the buffer that is likely to be interesting. These variables control the heuristic. Normally, parsing begins and ends on defun boundaries (an open parenthesis at the beginning of a line). @hid[Defun Parse Goal] specifies the number of defuns before and after the point to parse. If this parses fewer lines than @hid[Minimum Lines Parsed], then parsing continues until this lower limit is reached. If we cannot find enough defuns within @hid[Maximum Lines Parsed] lines then we stop on the farthest defun found, or at the point where we stopped if no defuns were found. When the heuristic fails, and does not parse enough of the buffer, then commands usually act as though a syntax error was detected. If the parse starts in a bad place (such as in the middle of a string), then Lisp commands will be totally confused. Such problems can usually be eliminated by increasing the values of some of these variables. @enddefhvar @defhvar[var "Parse Start Function", val {start-of-parse-block}] @defhvar1[var "Parse End Function", val {end-of-parse-block}] These variables determine the region of the buffer parsed. The values are functions that take a mark and move it to the start or end of the parse region. The default values implement the heuristic described above. @enddefhvar @comment[@chap(Interacting With Lisp)] @include(lisp) @comment[@chap(Mail Interface)] @include(mail) @comment[@chap(Netnews Interface)] @include(netnews) @chap[System Interface] @hemlock provides a number of commands that access operating system resources such as the filesystem and print servers. These commands offer an alternative to leaving the editor and using the normal operating system command language (such as the Unix shell), but they are implementation dependent. Therefore, they might not even exist in some implementations. @section[File Utility Commands] This section describes some general file operation commands and quick directory commands. See section @ref[dired] for a description @hemlock@comment{}'s directory editing mechanism, @hid[Dired] mode. @defcom[com "Copy File"] This command copies a file, allowing one wildcard in the filename. It prompts for source and destination specifications. If these are both directories, then the copying process is recursive on the source, and if the destination is in the subdirectory structure of the source, the recursion excludes this portion of the directory tree. Use @f[dir-spec-1/*] to copy only the files in a source directory without recursively descending into subdirectories. If the destination specification is a directory, and the source is a file, then it is copied into the destination with the same filename. The copying process copies files maintaining the source's write date. See the description of @hid[Dired Copy File Confirm], page @pageref[copy-confirm], for controlling user interaction when the destination exists. @enddefcom @defcom[com "Rename File"] This command renames a file, allowing one wildcard in the filename. It prompts for source and destination specifications. If the destination is a directory, then the renaming process moves file(s) indicated by the source into the directory with their original filenames. For Unix-based implementations, if you want to rename a directory, do not specify the trailing slash in the source specification. @enddefcom @defcom[com "Delete File"] This command prompts for the name of a file and deletes it. @enddefcom @defcom[com "Directory", bind (C-x C-d)] @defcom1[com "Verbose Directory", bind (C-x C-D)] These commands prompt for a pathname (which may contain wildcards), and display a directory listing in a pop-up window. If a prefix argument is supplied, then normally hidden files such as Unix dot-files will also be displayed. @hid[Directory] uses a compact, multiple-column format; @hid[Verbose Directory] displays one file on a line, with information about protection, size, etc. @enddefcom @section[Printing] @defcom[com "Print Region"] @defcom1[com "Print Buffer"] @defcom1[com "Print File"] @hid[Print Region] and @hid[Print Buffer] print the contents of the current region and the current buffer, respectively. @hid[Print File] prompts for a the name of a file and prints that file. Any error messages will be displayed in the echo area. @enddefcom @defhvar[var "Print Utility", val {"/usr/cs/bin/lpr"}] @defhvar1[var "Print Utility Switches", val {()}] @hid[Print Utility] is the program the print commands use to send files to the printer. The program should act like @f[lpr]: if a filename is given as an argument, it should print that file, and if no name appears, standard input should be assumed. @hid[Print Utility Switches] is a list of strings specifying the options to pass to the program. @enddefhvar @section[Scribe] @defcom[com "Scribe Buffer File", stuff (bound to @bf[C-x c] in @hid[Scribe] mode)] @defhvar1[var "Scribe Buffer File Confirm", val {t}] @defcom1[com "Scribe File"] @hid[Scribe Buffer File] invokes @hid[Scribe Utility] on the file associated with the current buffer. That process's default directory is the directory of the file. The process sends its output to the @hid[Scribe Warnings] buffer. Before doing anything, this asks the user to confirm saving and formatting the file. This prompting can be inhibited with "Scribe Buffer File Confirm". @hid[Scribe File] invokes @hid[Scribe Utility] on a file supplied by the user in the same manner as describe above. @enddefcom @defhvar[var "Scribe Utility", val {"/usr/misc/bin/scribe"}] @defhvar1[var "Scribe Utility Switches"] @hid[Scribe Utility] is the program the Scribe commands use to compile the text formatting. @hid[Scribe Utility Switches] is a list of strings whose contents would be contiguous characters, other than space, had the user invoked this program on a command line outside of @hemlock. Do not include the name of the file to compile in this variable; the Scribe commands supply this. @enddefhvar @defcom[com "Select Scribe Warnings", bind (Scribe: C-M-C)] This command makes the @hid[Scribe Warnings] buffer current if it exists. @enddefcom @section[Miscellaneous] @defcom[com "Manual Page"] This command displays a Unix manual page in a buffer which is in @hid[View] mode. When given an argument, this puts the manual page in a pop-up display. @enddefcom @defcom[com "Unix Filter Region"] This command prompts for a UNIX program and then passes the current region to the program as standard input. The standard output from the program is used to replace the region. This command is undoable. @enddefcom @chap[Simple Customization] @index[customization]@hemlock can be customized and extended to a very large degree, but in order to do much of this a knowledge of Lisp is required. These advanced aspects of customization are discussed in the @i[Hemlock Command Implementor's Manual], while simpler methods of customization are discussed here. @section[Keyboard Macros] @index[keyboard macros] Keyboard macros provide a facility to turn a sequence of commands into one command. @defcom[com "Define Keyboard Macro", bind {C-x (}] @defcom1[com "End Keyboard Macro", bind {C-x )}] @hid[Define Keyboard Macro] starts the definition of a keyboard macro. The commands which are invoked up until @hid[End Keyboard Macro] is invoked become the definition for the keyboard macro, thus replaying the keyboard macro is synonymous with invoking that sequence of commands. @enddefcom @defcom[com "Last Keyboard Macro", bind (C-x e)] This command is the keyboard macro most recently defined; invoking it will replay the keyboard macro. The prefix argument is used as a repeat count. @enddefcom @defcom[com "Define Keyboard Macro Key", bind (C-x M-(; )] @defhvar1[var "Define Keyboard Macro Key Confirm", val {t}] This command prompts for a key before going into a mode for defining keyboard macros. After defining the macro @hemlock binds it to the key. If the key is already bound, @hemlock asks for confirmation before clobbering the binding; this prompting can be inhibited by setting @hid[Define Keyboard Macro Key Confirm] to @nil. @enddefcom @defcom[com "Keyboard Macro Query", bind (C-x q)] This command conditionalizes the execution of a keyboard macro. When invoked during the definition of a macro, it does nothing. When the macro replays, it prompts the user for a key-event indicating what action to take. The following commands are defined: @begin[description] @binding[Escape]@\ Exit all repetitions of this keyboard macro. More than one may have been specified using a prefix argument. @binding[Space, y]@\ Proceed with the execution of the keyboard macro. @binding[Delete, Backspace, n]@\ Skip the remainder of the keyboard macro and go on to the next repetition, if any. @binding[!]@\ Do all remaining repetitions of the keyboard macro without prompting. @binding[.]@\ Complete this repetition of the macro and then exit without doing any of the remaining repetitions. @binding[C-r]@\ Do a recursive edit and then prompt again. @end[description] @enddefcom @defcom[com "Name Keyboard Macro"] This command prompts for the name of a command and then makes the definition for that command the same as @hid[Last Keyboard Macro]'s current definition. The command which results is not clobbered when another keyboard macro is defined, so it is possible to keep several keyboard macros around at once. The resulting command may also be bound to a key using @hid[Bind Key], in the same way any other command is. @enddefcom Many keyboard macros are not for customization, but rather for one-shot use, a typical example being performing some operation on each line of a file. To add "@f[del ]" to the beginning and "@f[.*]" to the end of every line in in a buffer, one could do this: @begin[programexample] C-x ( d e l Space C-e . * C-n C-a C-x ) C-u 9 9 9 C-x e @end[programexample] First a keyboard macro is defined which performs the desired operation on one line, and then the keyboard macro is invoked with a large prefix argument. The keyboard macro will not actually execute that many times; when the end of the buffer is reached the @binding[C-n] will get an error and abort the execution. @section[Binding Keys] @index[key bindings] @label[binding-keys] @defcom[com "Bind Key"] This command prompts for a command, a key and a kind of binding to make, and then makes the specified binding. The following kinds of bindings are allowed: @begin[description] @i[buffer]@\Prompts for a buffer and then makes a key binding which is only present when that buffer is the current buffer. @i[mode]@\Prompts for the name of a mode and then makes a key binding which is only in present when that mode is active in the current buffer. @i[global]@\Makes a global key binding which is in effect when there is no applicable mode or buffer key binding. This is the default. @end[description] @enddefcom @defcom[com "Delete Key Binding"] This command prompts for a key binding the same way that @hid[Bind Key] does and makes the specified binding go away. @enddefcom @section[Hemlock Variables] @label[vars]@index[variables, hemlock]@index[hemlock variables]A number of commands use @hemlock variables as flags to control their behavior. Often you can get a command to do what you want by setting a variable. Generally the default value for a variable is chosen to be the safest value for novice users. @defcom[com "Set Variable"] This command prompts for the name of a @hemlock variable and an expression, then sets the current value of the variable to the result of the evaluation of the expression. @enddefcom @defcom[com "Defhvar"] Like @hid[Set Variable], this command prompts for the name of a @hemlock variable and an expression. Like @hid[Bind Key], this command prompts for a place: mode, buffer or local. The result of evaluating the expression is defined to be the value of the named variable in the specified place. This command is most useful for making mode or buffer local bindings of variables. Redefining a variable in a mode or buffer will create a customization that takes effect only when in that mode or buffer. Unlike @hid[Set Variable], the variable name need not be the name of an existing variable: new variables may be defined. If the variable is already defined in the current environment, @hemlock copies the documentation and hooks to the new definition. @enddefcom @section[Init Files] @index[init files] @hemlock customizations are normally put in @hemlock@comment{}'s initialization file, "@f[hemlock-init.lisp]", or when compiled "@f[hemlock-init.fasl]". When starting up Lisp, use the @f[-hinit] switch to indicate a particular file. The contents of the init file must be Lisp code, but there is a fairly straightforward correspondence between the basic customization commands and the equivalent Lisp code. Rather than describe these functions in depth here, a brief example follows: @begin[programexample] ;;; -*- Mode: Lisp; Package: Hemlock -*- ;;; It is necessary to specify that the customizations go in ;;; the hemlock package. (in-package 'hemlock) ;;; Bind @hid[Kill Previous Word] to @binding[M-h]. (bind-key "Kill Previous Word" '#(#\m-h)) ;;; ;;; Bind @hid[Extract List] to @binding[C-M-?] when in @hid[Lisp] mode. (bind-key "Extract List" '#(#\c-m-?) :mode "Lisp") ;;; Make @binding[C-w] globally unbound. (delete-key-binding '#(#\c-w)) ;;; Make string searches case-sensitive. (setv string-search-ignore-case nil) ;;; ;;; Make "Query Replace" replace strings literally. (setv case-replace nil) @end[programexample] For a detailed description of these functions, see the @i[Hemlock Command Implementor's Manual].
CartoCSS
5
digikar99/ccl
cocoa-ide/hemlock/doc/user/user.mss
[ "Apache-2.0" ]
# Copyright (c) 2018-2021, Carnegie Mellon University # See LICENSE for details _SVCT_THRSHOLD := 2^13; NewRulesFor(GT, rec( # Vectorize AxI: A x I_n -> (A x I_n/v) x I_v GT_Vec_AxI := rec( forTransposition := false, requiredFirstTag := [AVecReg, AVecRegCx], applicable := t -> t.rank()=1 and t.params[2]=GTVec and t.params[3]=GTVec and IsInt(t.params[4][1] / t.firstTag().v), children := t -> let( r := t.params[4][1] / t.firstTag().v, isa := t.firstTag().isa, spl := t.params[1], #.setWrap(VWrap(isa)), tags := Drop(t.getTags(), 1), [[ GT(spl, GTVec, GTVec, [r]).withTags(tags).setWrap(VWrap(isa)) ]]), apply := (t, C, Nonterms) -> VTensor(C[1], t.firstTag().v), ), GT_Vec_IxA := rec( forTransposition := false, requiredFirstTag := [AVecReg, AVecRegCx], applicable := t -> t.rank()=1 and t.params[2]=GTPar and t.params[3]=GTPar and IsInt(t.params[4][1] / t.firstTag().v), children := t -> let( tags := t.getTags(), v := t.firstTag().v, # r := t.params[4][1] / v, spl := t.params[1], [[ TL(Rows(spl)*v, v, 1, 1).withTags(tags).setWrap(VWrapId), spl.withTags(Drop(tags, 1)).setWrap(VWrap(tags[1].isa)), TL(Cols(spl)*v, Cols(spl), 1, 1).withTags(tags).setWrap(VWrapId) ]]), apply := (t, C, Nonterms) -> let(P := t.params, v := t.firstTag().v, r := P[4][1] / v, A := C[1] * VTensor(C[2], v) * C[3], When(r=1, A, Tensor(I(r), A))) ), # Push vector tag down to preserve locality: vec(I x A) -> (I x vec(A)) GT_Vec_IxA_Push := rec( forTransposition := false, requiredFirstTag := [AVecReg, AVecRegCx], applicable := t -> t.rank()=1 and t.params[2]=GTPar and t.params[3]=GTPar, children := t -> [[ t.params[1].withTags(t.getTags()) ]], apply := (t, C, Nonterms) -> Tensor(I(t.params[4][1]), C[1]) ), # Split off L: vectorizes (I x A), (I x A) L, or L (I x A) # GT_Vec_SplitL := rec( minSize := _SVCT_THRSHOLD, forTransposition := false, requiredFirstTag := [AVecReg, AVecRegCx], applicable := (self, t) >> t.rank()=1 and Maximum(t.dims()) > self.minSize and (t.params{[2,3]} in [[GTPar, GTPar], [GTVec, GTPar], [GTPar, GTVec]]), children := t -> let(tags := t.getTags(), spl := t.params[1], n := t.params[4][1], g := t.params[2], s := t.params[3], [[ GT(spl, GTVec, GTVec, [n]).withTags(tags) ]]), apply := (t, C, Nonterms) -> let(spl := t.params[1], n := t.params[4][1], g := t.params[2], s := t.params[3], c := Concatenation( When(s=GTPar, [ L(Rows(spl)*n, n) ], []), [ C[1] ], When(g=GTPar, [ L(Cols(spl)*n, Cols(spl)) ], [])), Product(c)) ), GT_Vec_IxA_L := rec( maxSize := _SVCT_THRSHOLD, forTransposition := false, requiredFirstTag := [AVecReg, AVecRegCx], applicable := (self, t) >> t.rank()=1 and t.params[2]=GTVec and t.params[3]=GTPar and Maximum(t.dims()) <= self.maxSize and IsInt(t.params[4][1] / t.firstTag().v), children := t -> let(tags := t.getTags(), spl := t.params[1], v:=tags[1].v, isa:=tags[1].isa, spl := t.params[1], d:=spl.dims(), [[ TL(d[1]*v, v).withTags(tags).setWrap(VWrapId), spl.withTags(Drop(tags,1)).setWrap(VWrap(isa)) ]] ), apply := (t, C, Nonterms) -> let(spl := t.params[1], d:=spl.dims(), n := t.params[4][1], tag := t.firstTag(), v := tag.v, m := n / v, NoDiagPullinLeft(When(m=1, C[1] * VTensor(C[2], v), Tensor(I(m), C[1] * VTensor(C[2], v)) * VTensor(L(m*d[2], m), v) )) ), ), GT_Vec_L_IxA := rec( maxSize := _SVCT_THRSHOLD, forTransposition := false, requiredFirstTag := [AVecReg, AVecRegCx], applicable := (self, t) >> t.rank()=1 and t.params[2]=GTPar and t.params[3]=GTVec and Maximum(t.dims()) <= self.maxSize and IsInt(t.params[4][1] / t.firstTag().v), children := t -> let(tags := t.getTags(), spl := t.params[1], v:=tags[1].v, isa:=tags[1].isa, spl := t.params[1], d:=spl.dims(), [[ spl.withTags(Drop(tags,1)).setWrap(VWrap(isa)), TL(d[2]*v, d[2]).withTags(tags).setWrap(VWrapId) ]] ), apply := (t, C, Nonterms) -> let(spl := t.params[1], d:=spl.dims(), n := t.params[4][1], tag := t.firstTag(), v := tag.v, m := n / v, NoDiagPullinRight(When(m=1, VTensor(C[1], v) * C[2], VTensor(L(m*d[2], d[2]), v) * Tensor(I(m), VTensor(C[1], v) * C[2])))) ) ));
GAP
3
sr7cb/spiral-software
namespaces/spiral/paradigms/vector/breakdown/gt.gi
[ "BSD-2-Clause-FreeBSD" ]
package com.baeldung.synthetic; /** * Wrapper for a class which contains a synthetic field reference to the outer * class. * * @author Donato Rimenti * */ public class SyntheticFieldDemo { /** * Class which contains a synthetic field reference to the outer class. * * @author Donato Rimenti * */ class NestedClass { } }
Java
4
DBatOWL/tutorials
core-java-modules/core-java-lang/src/main/java/com/baeldung/synthetic/SyntheticFieldDemo.java
[ "MIT" ]
[Desktop Entry] Type=Application Version=1.0 Name=btop GenericName=System Monitor Comment=Resource monitor that shows usage and stats for processor, memory, disks, network and processes. Icon=btop Exec=btop Terminal=true Categories=System;Monitor;ConsoleOnly; Keywords=system;process;task
desktop
2
Mu-L/btop
btop.desktop
[ "Apache-2.0" ]
"""Test the Nina config flow.""" from __future__ import annotations import json from typing import Any from unittest.mock import patch from pynina import ApiError from homeassistant import data_entry_flow from homeassistant.components.nina.const import ( CONF_FILTER_CORONA, CONF_MESSAGE_SLOTS, CONST_REGION_A_TO_D, CONST_REGION_E_TO_H, CONST_REGION_I_TO_L, CONST_REGION_M_TO_Q, CONST_REGION_R_TO_U, CONST_REGION_V_TO_Z, DOMAIN, ) from homeassistant.config_entries import SOURCE_USER from homeassistant.core import HomeAssistant from tests.common import load_fixture DUMMY_DATA: dict[str, Any] = { CONF_MESSAGE_SLOTS: 5, CONST_REGION_A_TO_D: ["095760000000_0", "095760000000_1"], CONST_REGION_E_TO_H: ["010610000000_0", "010610000000_1"], CONST_REGION_I_TO_L: ["071320000000_0", "071320000000_1"], CONST_REGION_M_TO_Q: ["071380000000_0", "071380000000_1"], CONST_REGION_R_TO_U: ["072320000000_0", "072320000000_1"], CONST_REGION_V_TO_Z: ["081270000000_0", "081270000000_1"], CONF_FILTER_CORONA: True, } DUMMY_RESPONSE: dict[str, Any] = json.loads(load_fixture("sample_regions.json", "nina")) async def test_show_set_form(hass: HomeAssistant) -> None: """Test that the setup form is served.""" with patch( "pynina.baseApi.BaseAPI._makeRequest", return_value=DUMMY_RESPONSE, ): result: dict[str, Any] = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_USER} ) assert result["type"] == data_entry_flow.RESULT_TYPE_FORM assert result["step_id"] == "user" async def test_step_user_connection_error(hass: HomeAssistant) -> None: """Test starting a flow by user but no connection.""" with patch( "pynina.baseApi.BaseAPI._makeRequest", side_effect=ApiError("Could not connect to Api"), ): result: dict[str, Any] = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_USER}, data=DUMMY_DATA ) assert result["type"] == data_entry_flow.RESULT_TYPE_FORM assert result["errors"] == {"base": "cannot_connect"} async def test_step_user_unexpected_exception(hass: HomeAssistant) -> None: """Test starting a flow by user but with an unexpected exception.""" with patch( "pynina.baseApi.BaseAPI._makeRequest", side_effect=Exception("DUMMY"), ): result: dict[str, Any] = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_USER}, data=DUMMY_DATA ) assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT async def test_step_user(hass: HomeAssistant) -> None: """Test starting a flow by user with valid values.""" with patch( "pynina.baseApi.BaseAPI._makeRequest", return_value=DUMMY_RESPONSE, ), patch( "homeassistant.components.nina.async_setup_entry", return_value=True, ): result: dict[str, Any] = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_USER}, data=DUMMY_DATA ) assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY assert result["title"] == "NINA" async def test_step_user_no_selection(hass: HomeAssistant) -> None: """Test starting a flow by user with no selection.""" with patch( "pynina.baseApi.BaseAPI._makeRequest", return_value=DUMMY_RESPONSE, ): result: dict[str, Any] = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_USER}, data={} ) assert result["type"] == data_entry_flow.RESULT_TYPE_FORM assert result["step_id"] == "user" assert result["errors"] == {"base": "no_selection"} async def test_step_user_already_configured(hass: HomeAssistant) -> None: """Test starting a flow by user but it was already configured.""" with patch( "pynina.baseApi.BaseAPI._makeRequest", return_value=DUMMY_RESPONSE, ): result: dict[str, Any] = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_USER}, data=DUMMY_DATA ) result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": SOURCE_USER}, data=DUMMY_DATA ) assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT assert result["reason"] == "single_instance_allowed"
Python
5
MrDelik/core
tests/components/nina/test_config_flow.py
[ "Apache-2.0" ]
# Copies the path of given directory or file to the system or X Windows clipboard. # Copy current directory if no parameter. function copypath { # If no argument passed, use current directory local file="${1:-.}" # If argument is not an absolute path, prepend $PWD [[ $file = /* ]] || file="$PWD/$file" # Copy the absolute path without resolving symlinks # If clipcopy fails, exit the function with an error print -n "${file:a}" | clipcopy || return 1 echo ${(%):-"%B${file:a}%b copied to clipboard."} }
Shell
4
residwi/ohmyzsh
plugins/copypath/copypath.plugin.zsh
[ "MIT" ]
import random from textblob import TextBlob from textblob.np_extractors import ConllExtractor extractor = ConllExtractor() def main(): print("Hello, I am Marvin, the friendly robot.") print("You can end this conversation at any time by typing 'bye'") print("After typing each answer, press 'enter'") print("How are you today?") while True: # wait for the user to enter some text user_input = input("> ") if user_input.lower() == "bye": # if they typed in 'bye' (or even BYE, ByE, byE etc.), break out of the loop break else: # Create a TextBlob based on the user input. Then extract the noun phrases user_input_blob = TextBlob(user_input, np_extractor=extractor) np = user_input_blob.noun_phrases response = "" if user_input_blob.polarity <= -0.5: response = "Oh dear, that sounds bad. " elif user_input_blob.polarity <= 0: response = "Hmm, that's not great. " elif user_input_blob.polarity <= 0.5: response = "Well, that sounds positive. " elif user_input_blob.polarity <= 1: response = "Wow, that sounds great. " if len(np) != 0: # There was at least one noun phrase detected, so ask about that and pluralise it # e.g. cat -> cats or mouse -> mice response = response + "Can you tell me more about " + np[0].pluralize() + "?" else: response = response + "Can you tell me more?" print(response) print("It was nice talking to you, goodbye!") # Start the program main()
Python
4
fdelmo/ML-For-Beginners
6-NLP/2-Tasks/solution/bot.py
[ "MIT" ]
{ "@context": "http://www.w3.org/ns/anno.jsonld", "id": "/annotations/anno1.jsonld", "type": "Annotation", "created": "2015-01-31T12:03:45Z", "body": { "type": "TextualBody", "value": "I like this page!" }, "target": "/index.html" }
JSONLD
3
ziransun/wpt
annotation-protocol/files/annotations/anno1.jsonld
[ "BSD-3-Clause" ]
; --------------------- ; Util.nsh ; --------------------- ; ; Voodoo macros to make end-user usage easier. This may be documented someday. !verbose push !verbose 3 !ifndef ___UTIL__NSH___ !define ___UTIL__NSH___ # see WinVer.nsh and *Func.nsh for usage examples !macro CallArtificialFunction NAME !ifndef __UNINSTALL__ !define CallArtificialFunction_TYPE inst !else !define CallArtificialFunction_TYPE uninst !endif Call :.${NAME}${CallArtificialFunction_TYPE} !ifndef ${NAME}${CallArtificialFunction_TYPE}_DEFINED Goto ${NAME}${CallArtificialFunction_TYPE}_DONE !define ${NAME}${CallArtificialFunction_TYPE}_DEFINED .${NAME}${CallArtificialFunction_TYPE}: !insertmacro ${NAME} Return ${NAME}${CallArtificialFunction_TYPE}_DONE: !endif !undef CallArtificialFunction_TYPE !macroend !define CallArtificialFunction `!insertmacro CallArtificialFunction` # for usage of artificial functions inside artificial functions # macro recursion is prohibited !macro CallArtificialFunction2 NAME !ifndef __UNINSTALL__ !define CallArtificialFunction2_TYPE inst !else !define CallArtificialFunction2_TYPE uninst !endif Call :.${NAME}${CallArtificialFunction2_TYPE} !ifndef ${NAME}${CallArtificialFunction2_TYPE}_DEFINED Goto ${NAME}${CallArtificialFunction2_TYPE}_DONE !define ${NAME}${CallArtificialFunction2_TYPE}_DEFINED .${NAME}${CallArtificialFunction2_TYPE}: !insertmacro ${NAME} Return ${NAME}${CallArtificialFunction2_TYPE}_DONE: !endif !undef CallArtificialFunction2_TYPE !macroend !define CallArtificialFunction2 `!insertmacro CallArtificialFunction2` !endif # !___UTIL__NSH___ !verbose pop
NSIS
4
vbillet/Torque3D
Engine/bin/tools/nsis/app/Include/Util.nsh
[ "MIT" ]
constant ==================== .. automodule:: hanlp_common.constant :members:
reStructuredText
0
antfootAlex/HanLP
docs/api/common/constant.rst
[ "Apache-2.0" ]
--TEST-- Test DateTime::setTimezone() function : basic functionality --FILE-- <?php echo "*** Testing DateTime::setTimezone() : basic functionality ***\n"; //Set the default time zone date_default_timezone_set("Europe/London"); $datetime = new DateTime("2009-01-30 17:57:32"); echo "Default timezone: " . date_timezone_get($datetime)->getName() . "\n"; $la_time = new DateTimezone("America/Los_Angeles"); $datetime->setTimezone($la_time); echo "New timezone: " . date_timezone_get($datetime)->getName() . "\n"; ?> --EXPECT-- *** Testing DateTime::setTimezone() : basic functionality *** Default timezone: Europe/London New timezone: America/Los_Angeles
PHP
4
NathanFreeman/php-src
ext/date/tests/DateTime_setTimezone_basic1.phpt
[ "PHP-3.01" ]
// (c) Copyright 1995-2016 Xilinx, Inc. All rights reserved. // // This file contains confidential and proprietary information // of Xilinx, Inc. and is protected under U.S. and // international copyright and other intellectual property // laws. // // DISCLAIMER // This disclaimer is not a license and does not grant any // rights to the materials distributed herewith. Except as // otherwise provided in a valid license issued to you by // Xilinx, and to the maximum extent permitted by applicable // law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND // WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES // AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING // BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- // INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and // (2) Xilinx shall not be liable (whether in contract or tort, // including negligence, or under any other theory of // liability) for any loss or damage of any kind or nature // related to, arising under or in connection with these // materials, including for any direct, or any indirect, // special, incidental, or consequential loss or damage // (including loss of data, profits, goodwill, or any type of // loss or damage suffered as a result of any action brought // by a third party) even if such damage or loss was // reasonably foreseeable or Xilinx had been advised of the // possibility of the same. // // CRITICAL APPLICATIONS // Xilinx products are not designed or intended to be fail- // safe, or for use in any application requiring fail-safe // performance, such as life-support or safety devices or // systems, Class III medical devices, nuclear facilities, // applications related to the deployment of airbags, or any // other applications that could lead to death, personal // injury, or severe property or environmental damage // (individually and collectively, "Critical // Applications"). Customer assumes the sole risk and // liability of any use of Xilinx products in Critical // Applications, subject only to applicable laws and // regulations governing limitations on product liability. // // THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS // PART OF THIS FILE AT ALL TIMES. // // DO NOT MODIFY THIS FILE. // IP VLNV: xilinx.com:hls:HLS_accel:1.0 // IP Revision: 1605192151 // The following must be inserted into your Verilog file for this // core to be instantiated. Change the instance name and port connections // (in parentheses) to your own signal names. //----------- Begin Cut here for INSTANTIATION Template ---// INST_TAG system_HLS_accel_0_0 your_instance_name ( .s_axi_CONTROL_BUS_AWADDR(s_axi_CONTROL_BUS_AWADDR), // input wire [4 : 0] s_axi_CONTROL_BUS_AWADDR .s_axi_CONTROL_BUS_AWVALID(s_axi_CONTROL_BUS_AWVALID), // input wire s_axi_CONTROL_BUS_AWVALID .s_axi_CONTROL_BUS_AWREADY(s_axi_CONTROL_BUS_AWREADY), // output wire s_axi_CONTROL_BUS_AWREADY .s_axi_CONTROL_BUS_WDATA(s_axi_CONTROL_BUS_WDATA), // input wire [31 : 0] s_axi_CONTROL_BUS_WDATA .s_axi_CONTROL_BUS_WSTRB(s_axi_CONTROL_BUS_WSTRB), // input wire [3 : 0] s_axi_CONTROL_BUS_WSTRB .s_axi_CONTROL_BUS_WVALID(s_axi_CONTROL_BUS_WVALID), // input wire s_axi_CONTROL_BUS_WVALID .s_axi_CONTROL_BUS_WREADY(s_axi_CONTROL_BUS_WREADY), // output wire s_axi_CONTROL_BUS_WREADY .s_axi_CONTROL_BUS_BRESP(s_axi_CONTROL_BUS_BRESP), // output wire [1 : 0] s_axi_CONTROL_BUS_BRESP .s_axi_CONTROL_BUS_BVALID(s_axi_CONTROL_BUS_BVALID), // output wire s_axi_CONTROL_BUS_BVALID .s_axi_CONTROL_BUS_BREADY(s_axi_CONTROL_BUS_BREADY), // input wire s_axi_CONTROL_BUS_BREADY .s_axi_CONTROL_BUS_ARADDR(s_axi_CONTROL_BUS_ARADDR), // input wire [4 : 0] s_axi_CONTROL_BUS_ARADDR .s_axi_CONTROL_BUS_ARVALID(s_axi_CONTROL_BUS_ARVALID), // input wire s_axi_CONTROL_BUS_ARVALID .s_axi_CONTROL_BUS_ARREADY(s_axi_CONTROL_BUS_ARREADY), // output wire s_axi_CONTROL_BUS_ARREADY .s_axi_CONTROL_BUS_RDATA(s_axi_CONTROL_BUS_RDATA), // output wire [31 : 0] s_axi_CONTROL_BUS_RDATA .s_axi_CONTROL_BUS_RRESP(s_axi_CONTROL_BUS_RRESP), // output wire [1 : 0] s_axi_CONTROL_BUS_RRESP .s_axi_CONTROL_BUS_RVALID(s_axi_CONTROL_BUS_RVALID), // output wire s_axi_CONTROL_BUS_RVALID .s_axi_CONTROL_BUS_RREADY(s_axi_CONTROL_BUS_RREADY), // input wire s_axi_CONTROL_BUS_RREADY .ap_clk(ap_clk), // input wire ap_clk .ap_rst_n(ap_rst_n), // input wire ap_rst_n .interrupt(interrupt), // output wire interrupt .INPUT_STREAM_TVALID(INPUT_STREAM_TVALID), // input wire INPUT_STREAM_TVALID .INPUT_STREAM_TREADY(INPUT_STREAM_TREADY), // output wire INPUT_STREAM_TREADY .INPUT_STREAM_TDATA(INPUT_STREAM_TDATA), // input wire [31 : 0] INPUT_STREAM_TDATA .INPUT_STREAM_TDEST(INPUT_STREAM_TDEST), // input wire [4 : 0] INPUT_STREAM_TDEST .INPUT_STREAM_TKEEP(INPUT_STREAM_TKEEP), // input wire [3 : 0] INPUT_STREAM_TKEEP .INPUT_STREAM_TSTRB(INPUT_STREAM_TSTRB), // input wire [3 : 0] INPUT_STREAM_TSTRB .INPUT_STREAM_TUSER(INPUT_STREAM_TUSER), // input wire [3 : 0] INPUT_STREAM_TUSER .INPUT_STREAM_TLAST(INPUT_STREAM_TLAST), // input wire [0 : 0] INPUT_STREAM_TLAST .INPUT_STREAM_TID(INPUT_STREAM_TID), // input wire [4 : 0] INPUT_STREAM_TID .OUTPUT_STREAM_TVALID(OUTPUT_STREAM_TVALID), // output wire OUTPUT_STREAM_TVALID .OUTPUT_STREAM_TREADY(OUTPUT_STREAM_TREADY), // input wire OUTPUT_STREAM_TREADY .OUTPUT_STREAM_TDATA(OUTPUT_STREAM_TDATA), // output wire [31 : 0] OUTPUT_STREAM_TDATA .OUTPUT_STREAM_TDEST(OUTPUT_STREAM_TDEST), // output wire [4 : 0] OUTPUT_STREAM_TDEST .OUTPUT_STREAM_TKEEP(OUTPUT_STREAM_TKEEP), // output wire [3 : 0] OUTPUT_STREAM_TKEEP .OUTPUT_STREAM_TSTRB(OUTPUT_STREAM_TSTRB), // output wire [3 : 0] OUTPUT_STREAM_TSTRB .OUTPUT_STREAM_TUSER(OUTPUT_STREAM_TUSER), // output wire [3 : 0] OUTPUT_STREAM_TUSER .OUTPUT_STREAM_TLAST(OUTPUT_STREAM_TLAST), // output wire [0 : 0] OUTPUT_STREAM_TLAST .OUTPUT_STREAM_TID(OUTPUT_STREAM_TID) // output wire [4 : 0] OUTPUT_STREAM_TID ); // INST_TAG_END ------ End INSTANTIATION Template --------- // You must compile the wrapper file system_HLS_accel_0_0.v when simulating // the core, system_HLS_accel_0_0. When compiling the wrapper file, be sure to // reference the Verilog simulation library.
Verilog
3
YingcaiDong/Shunting-Model-Based-Path-Planning-Algorithm-Accelerator-Using-FPGA
System Design Source FIle/bd/system/ip/system_HLS_accel_0_0/system_HLS_accel_0_0.veo
[ "MIT" ]
#!/usr/bin/osascript # Required parameters: # @raycast.author Jax0rz # @authorURL https://github.com/Jax0rz # @raycast.schemaVersion 1 # @raycast.title Create New File in Finder # @raycast.mode silent # @raycast.packageName System # @raycast.description Create New File in Finder is a script to make your Finder better.You can use this script to create a plain text file. # Optional parameters: # @raycast.icon images/new-file.png set file_name to "untitled" set file_ext to ".txt" set is_desktop to false -- get folder path and if we're in desktop (no folder opened) try tell application "Finder" set this_folder to (folder of the front Finder window) as alias end tell on error -- no open folder windows set this_folder to path to desktop folder as alias set is_desktop to true end try -- get the new file name (do not override an already existing file) tell application "System Events" set file_list to get the name of every disk item of this_folder end tell set new_file to file_name & file_ext set x to 1 repeat if new_file is in file_list then set new_file to file_name & " " & x & file_ext set x to x + 1 else exit repeat end if end repeat -- create and select the new file tell application "Finder" activate set the_file to make new file at folder this_folder with properties {name:new_file} if is_desktop is false then reveal the_file else select window of desktop set selection to the_file delay 0.1 end if end tell -- press enter (rename) tell application "System Events" tell process "Finder" keystroke return end tell end tell
AppleScript
4
tanaynistala/script-commands
commands/system/create-new-file-in-finder.applescript
[ "MIT" ]
#!/bin/bash # Tags a release echo "#################################" echo "## Tag angular.js for a release #" echo "#################################" ARG_DEFS=( "--action=(prepare|publish)" "--commit-sha=(.*)" # the version number of the release. # e.g. 1.2.12 or 1.2.12-rc.1 "--version-number=([0-9]+\.[0-9]+\.[0-9]+(-[a-z]+\.[0-9]+)?)" "--version-name=(.+)" ) function checkVersionNumber() { BRANCH_PATTERN=$(readJsonProp "package.json" "branchPattern") if [[ $VERSION_NUMBER != $BRANCH_PATTERN ]]; then echo "version-number needs to match $BRANCH_PATTERN on this branch" usage fi } function init { cd ../.. checkVersionNumber TAG_NAME="v$VERSION_NUMBER" } function prepare() { git tag "$TAG_NAME" -m "chore(release): $TAG_NAME codename($VERSION_NAME)" "$COMMIT_SHA" } function publish() { # push the tag to github git push origin $TAG_NAME } source $(dirname $0)/../utils.inc
Shell
4
alexgberry/angular.js
scripts/angular.js/tag-release.sh
[ "MIT" ]
import neskit.apu; struct Triangle { public static var dutyLookup: CArray[Uint8, 32] = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, ]; public static function new() { return struct Triangle {}; } rules { ($this.enabled) => $this.period > 0 && ($this.lengthCounterHalt || $this.lengthCounter > 0) && $this.linearCounter > 0; } public function readReg(i: Uint8): Uint8 { match i { 1 => return this.counterReload | (if this.lengthCounterHalt then 0x80 else 0); 2 => return 0; 3 => return this.frequency & 0xff; 4 => return ((this.frequency & 0x700) >> 8) | (this.length << 3); default => return 0; } } public function writeReg(i: Uint8, v: Uint8) { match i { 1 => { this.counterReload = v & 0x7f; this.lengthCounterHalt = getbit(v, 7); } 2 => {} 3 => { this.setFrequency((this.frequency & 0x700) | v); } 4 => { this.setFrequency((this.frequency & 0xff) | ((v & 7) << 8)); this.lengthCounter = Apu.lengthCounterTable[v]; this.length = (v & 0xf8) >> 3; this.linearCounter = this.counterReload; return v; } } } function setFrequency(f: Uint8) { this.period = if (f < 8) then 0 else 1 * (f + 1); this.frequency = f; } var frequency: Int = 0; var amplitude: Int = 0; var period: Int = 0; var position: Float = 0; var dutyPos: Int = 0; var length: Int = 0; var lengthCounter: Int = 0; var lengthCounterHalt: Bool = false; var linearCounter: Int = 0; var counterReload: Int = 0; public function lengthClock() { if !this.lengthCounterHalt && this.lengthCounter > 0 { --this.lengthCounter; } } public function envelopeClock() { if this.linearCounter > 0 { --this.linearCounter; } } public function play(rate: Float): Uint8 { var val = 0; if this.enabled { if (this.position += rate) > this.period { this.dutyPos = (this.dutyPos + 1) % 32; this.position -= this.period; } val = Self.dutyLookup[this.dutyPos]; } else { this.dutyPos = 0; } return val; } }
Kit
3
smola/language-dataset
data/github.com/bendmorris/neskit/609133a5055e30189d12ac79d87f7df797882479/src/neskit/audio/triangle.kit
[ "MIT" ]
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef TENSORFLOW_LITE_SIMPLE_MEMORY_ARENA_H_ #define TENSORFLOW_LITE_SIMPLE_MEMORY_ARENA_H_ #include <stddef.h> #include <cstdint> #include <memory> #include <string> #include <vector> #include "tensorflow/lite/c/common.h" namespace tflite { // This little structure holds the offset and the size for a dynamic memory // allocation in the memory arena as well as first_node and last_node that use // corresponding tensor. It means that continuous part of memory with this size // needs to be allocated before execution of operation in the first node and can // be deallocated after execution of the operation in the last_node. When the // arena is committed and the underlying buffer is set, the alloc can be // resolved into an actual memory pointer. struct ArenaAllocWithUsageInterval { ArenaAllocWithUsageInterval() { reset(); } size_t offset; size_t size; int32_t tensor; int32_t first_node; int32_t last_node; inline void reset() { offset = 0; size = 0; tensor = -1; first_node = -1; last_node = -1; } inline bool operator<(const ArenaAllocWithUsageInterval& other) const { return offset < other.offset; } }; // This small class is responsible for allocating, deallocating and reusing // dynamic memory from a common underlying buffer. The arena can be used in // scenarios when the pattern of memory allocations and deallocations is // repetitive, e.g. running NN inference in multiple iterations. Note that // zero-sized allocations are explicitly allowed, and will resolve to null. class SimpleMemoryArena { public: explicit SimpleMemoryArena(size_t arena_alignment) : committed_(false), arena_alignment_(arena_alignment), high_water_mark_(0), underlying_buffer_size_(0), ordered_allocs_() {} // Schedule memory allocation for a tensor with a given size, assuming that it // needs to be allocated before the execution of first_node, and deallocated // after the execution of last_node. TfLiteStatus Allocate(TfLiteContext* context, size_t alignment, size_t size, int32_t tensor, int32_t first_node, int32_t last_node, ArenaAllocWithUsageInterval* new_alloc); TfLiteStatus Deallocate(TfLiteContext* context, const ArenaAllocWithUsageInterval& alloc); inline size_t RequiredBufferSize() { // Add in a small amount of padding to reduce the chance of resize events // for small allocations. size_t padding = arena_alignment_; return arena_alignment_ + high_water_mark_ + padding; } TfLiteStatus Commit(TfLiteContext* context); TfLiteStatus ResolveAlloc(TfLiteContext* context, const ArenaAllocWithUsageInterval& alloc, char** output_ptr); // This clears allocation details but does not release the underlying buffer. // New allocations should be committed & resolved before using this arena // again. TfLiteStatus ClearPlan(); // This releases the underlying buffer but does not clear the allocation plan. // Since all associated pointers are invalidated, the arena cannot be used // again until Commit() is called & tensor allocations are resolved. TfLiteStatus ReleaseBuffer(); size_t GetBufferSize() { return underlying_buffer_size_; } std::intptr_t BasePointer() const { return reinterpret_cast<std::intptr_t>(underlying_buffer_aligned_ptr_); } // Dumps the memory allocation information of this memory arena (which could // be differentiated from others by the `name`) against the specified op node // execution plan (i.e. `execution_plan`) for the purpose of debugging. // Note: in order to have minimal binary increase caused by this debug info // dump implementation for the TfLite library, and allow users to plug-in // their own memory planner debugger, we have utilized weak symbols to meet // these two requirementsements. By default, there is no debugging info // dumped. To override this, provide a strong defintion of // tflite::DumpArenaInfo(...) whose weak defintion is in // simple_memory_arena.cc. TfLite provides a sample one as // "lite:simple_memory_arena_debug_dump". When this dep is added to the // program, calling this function will output information of this memory arena // about tenosrs and ops, such as memory arena utilization rate, live tensors // at each op etc. void DumpDebugInfo(const std::string& name, const std::vector<int>& execution_plan) const; private: bool committed_; size_t arena_alignment_; size_t high_water_mark_; std::unique_ptr<char[]> underlying_buffer_; size_t underlying_buffer_size_; char* underlying_buffer_aligned_ptr_; std::vector<ArenaAllocWithUsageInterval> ordered_allocs_; }; } // namespace tflite #endif // TENSORFLOW_LITE_SIMPLE_MEMORY_ARENA_H_
C
5
EricRemmerswaal/tensorflow
tensorflow/lite/simple_memory_arena.h
[ "Apache-2.0" ]
/*!40101 SET NAMES binary*/; DROP TABLE IF EXISTS `v1`; DROP VIEW IF EXISTS `v1`; SET @PREV_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT; SET @PREV_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS; SET @PREV_COLLATION_CONNECTION=@@COLLATION_CONNECTION; SET character_set_client = utf8; SET character_set_results = utf8; SET collation_connection = utf8_general_ci; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`192.168.198.178` SQL SECURITY DEFINER VIEW `v1` (`i`, `s`) AS SELECT `i`,`s` FROM `db1`.`tbl`; SET character_set_client = @PREV_CHARACTER_SET_CLIENT; SET character_set_results = @PREV_CHARACTER_SET_RESULTS; SET collation_connection = @PREV_COLLATION_CONNECTION;
SQL
3
suryatmodulus/tidb
br/tests/lightning_view/data/db1.v1-schema-view.sql
[ "Apache-2.0", "BSD-3-Clause" ]
(define (prompt-for-cd) "Prompts for CD" (prompt-read "Title" 1.53 1 2/4 1.7 1.7e0 2.9E-4 +42 -7 #b001 #b001/100 #o777 #O777 #xabc55 #c(0 -5.6)) (prompt-read "Artist") (or (parse-integer (prompt-read "Rating") #:junk-allowed #t) 0) (if x (format #t "yes") (format #f "no") ;and here comment ) ;; second line comment '(+ 1 2) (position-if-not char-set:whitespace line #:start beg)) (quote (privet 1 2 3)) '(hello world) (* 5 7) (1 2 34 5) (#:use "aaaa") (let ((x 10) (y 20)) (display (+ x y)) ) "asdad\0eqweqe"
Scheme
3
websharks/ace-builds
demo/kitchen-sink/docs/scheme.scm
[ "BSD-3-Clause" ]
--TEST-- Object type can only default to null --FILE-- <?php function test(object $obj = 42) { } ?> --EXPECTF-- Fatal error: Cannot use int as default value for parameter $obj of type object in %s on line %d
PHP
4
thiagooak/php-src
Zend/tests/object_types/invalid_default_value.phpt
[ "PHP-3.01" ]
2016-04-07 13:40:09 fsociety ooo.. UX event 2016-04-07 13:40:09 [13:40] 2016-04-07 13:40:11 [Rohan] is away: Away 2016-04-07 13:40:15 fsociety and how is the beard oil goin' 2016-04-07 13:43:46 fsociety sorry meg must have hit the network cable or router at home 2016-04-07 13:43:53 fsociety i tunnel into my home machine to do personal chats 2016-04-07 13:48:55 Rohan That's alright, beard oil is on the slow burner at the moment 2016-04-07 13:49:19 fsociety its all about UX then 2016-04-07 13:49:27 Rohan Yeah 2016-04-07 13:49:34 Rohan So much work on 2016-04-07 13:49:45 fsociety haha.. any other personal projects? 2016-04-07 13:49:55 Rohan Can't divide my time to give it enough 2016-04-07 13:49:58 Rohan Carving spoons 2016-04-07 13:50:06 Rohan Nay got me a knife for xmas 2016-04-07 13:50:37 fsociety haha, you can do some Alien knife handy stuff in your sparetime 2016-04-07 13:50:38 Rohan But need to pick up some wood off Colin 2016-04-07 13:50:39 fsociety freak nay out 2016-04-07 13:50:49 fsociety ahh yeah Colin mentioned that the other day 2016-04-07 13:51:10 fsociety Colin and I spent last weeked literally for eight hours play the new wrestling game that came out 2016-04-07 13:51:11 fsociety haha 2016-04-07 13:51:23 fsociety normally i couldn't see myself playing a wrestling video game that long 2016-04-07 13:51:35 fsociety but i got it for Colin.. haha 2016-04-07 13:51:59 Rohan Nice, I used to play the old WWF game on sega 2016-04-07 13:52:02 Rohan That was fun 2016-04-07 13:52:12 Rohan And the last wrestling game I ever played 2016-04-07 13:53:05 fsociety yeah i was expecting this wrestling game to have some ridiculous game mechanics, but its pretty streamlined.. for a change 2016-04-07 13:53:33 fsociety doesn't require memorising 30 button combinations and to contemplate the universe while trying to figure out how to do a simple kick 2016-04-07 13:54:24 fsociety oh did you ever end up watching mr robot 2016-04-07 13:54:25 Rohan Hahaha that's how I remebr trying to play UFC 2016-04-07 13:54:29 fsociety its been that long since i've seen you 2016-04-07 13:54:54 fsociety yeah UFC requires you sacrifice your first born to beat the game on easy 2016-04-07 13:56:54 Rohan Didn't get past the first episode 2016-04-07 13:56:54 [13:56] 2016-04-07 13:57:34 Rohan Wasn't super interested in any of the characteds 2016-04-07 14:03:00 [13:57] 2016-04-07 14:09:09 fsociety aww.. really 2016-04-07 14:09:13 fsociety something wrong with ya 2016-04-07 14:10:05 fsociety for me banshee started again 2016-04-07 14:10:10 fsociety i'm a happy chappy 2016-04-07 14:16:00 [14:10] 2016-04-07 14:22:11 Rohan That's the ex con who kills the new sherif then prentends to be him? 2016-04-07 14:28:00 [14:22] 2016-04-07 14:44:56 fsociety yeaaah 2016-04-07 14:44:56 [14:44] 2016-04-07 14:44:57 fsociety last season 2016-04-07 14:50:00 [14:44]
IRC log
0
0x4b1dN/2016-dots
misc/weechat/logs/irc.bitlbee.rohan.weechatlog
[ "MIT" ]
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // #docregion import {Pipe, PipeTransform} from '@angular/core'; @Pipe({name: 'truncate'}) export class TruncatePipe implements PipeTransform { transform(value: string, length: number, symbol: string) { return value.split(' ').slice(0, length).join(' ') + symbol; } }
TypeScript
4
John-Cassidy/angular
packages/examples/core/ts/pipes/truncate.ts
[ "MIT" ]
=== Installation === You can just "git clone" or download the zip from github.com and unzip into an empty directory. Then recursively copy the folder {{{MQL4}}} over the {{{MQL4}}} folder in your personal {{{AppData...}}} directory (something like {{{c:\Users\Administrator\AppData\Roaming\MetaQuotes\Terminal\LONGHEXNANE}}}). It will not overwrite any system files, and keeps its files in subdirectories called {{{OTMql4}}}. Then copy the DLL files to the right places: {{{ src\mql4zmq\pre-compiled\mql4zmq.dll => c:\Program Files\[metatrader directory]\MQL4\Libraries\OTMql4\mql4zmq.dll src\mql4zmq\pre-compiled\libzmq.dll => c:\Windows\SysWOW64\libzmq.dll or => c:\Windows\System32\libzmq.dll or whatever the windows system library is for your version of Windows. }}} These dlls and the header file {{{MQL4/Include/OTMql4/OTMql4Zmq.mqh}}} are maintained in the [[mql4zmq|https://github.com/OpenTrading/mql4zmq]] project. These to projects should always be in sync, but if there is ever a difference, use the files that are in this project and report bugs against them here. We'll push the changes upstream to that project, and that project may be "broken" as it tries to upgrade to ZeroMQ 4.x. === Prerequisites === This project requires the prior installation of our MQL4 trading library: https://github.com/OpenTrading/OTMql4Lib. Again, {{{git clone}}} this from https://github.com and recursively copy it's folder MQL4 over the MQL4 folder of your personal Metatrader installation. To use the Python version of OTMql4Zmq, or to use the testing [[Scripts]] in the {{{bin}}} directory with either version, this project requires the prior installation of our OTMql4Py project: https://github.com/OpenTrading/OTMql4Py. Again, {{{git clone}}} this from https://github.com and recursively copy it's folder MQL4 over the MQL4 folder of your personal Metatrader directory. See [[PyZmq]]. ==== Dependencies ==== You will need the Microsoft Visual C version 10.0 (2010) runtime libraries installed. On some versions of Windows, these may already be installed, or other software may already have installed these for you. You can get the VC 10.0 Runtime from the links below: * Microsoft Visual C++ 2010 Redistributable Package (x86) http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84&displaylang=en https://www.microsoft.com/en-us/download/details.aspx?id=5555 * Microsoft Visual C++ 2010 Redistributable Package (x64) http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=bd512d9e-43c8-4655-81bf-9350143d5867 https://www.microsoft.com/en-us/download/details.aspx?id=14632 These are required to be able to load the {{{libzmq.dll}}} as it was compiled by Microsoft Visual C++ 2010 Express. ---- Parent: [[Home]]
Creole
3
lionelyoung/OTMql4Zmq
wiki/Installation.creole
[ "MIT" ]
//Rcon fix //Returns 0 in OnRconCommand to allow gamemodes to process the commands forward OnRconCommand(cmd[]); public OnRconCommand(cmd[]) { return 0; }
PAWN
3
TheFuseGamer/SampSharp
env/filterscripts/empty.pwn
[ "Apache-2.0" ]
i 00001 00 30 00003 00 22 00000 i 00002 02 33 76543 00 22 00000 i 00003 06 33 12345 00 22 00000
Octave
1
besm6/mesm6
test/uj/uj.oct
[ "MIT" ]
#!/usr/local/bin/io VDBAssertion := Object clone do( actualBody ::= nil expectedBody ::= nil actualStatusCode ::= nil expectedStatusCode ::= 200 action ::= nil variant ::= "default" port ::= "9523" //DONT CHANGE THIS. WE WOULDN'T WANT TO ACCIDENTALLY WIPE OUT THE PRODUCTION DB host ::= "localhost" writeln("running tests on ", host, ":", port) baseUrl ::= method("http://" .. host .. ":" .. port) basePath ::= "/test" path ::= "" params ::= List clone with := method(aVariant, self clone setVariant(aVariant) ) init := method( resend params = params clone ) queryString := method( str := ("?action=" .. action) asMutable if(params size > 0, str appendSeq("&") appendSeq(params join("&")) ) str ) addParams := method( params appendSeq(call evalArgs) self ) url ::= method( setUrl(URL with(Sequence with(baseUrl, basePath, path, queryString))) url ) raise := method(m, URL with(baseUrl .. "?action=log") post(m) //Exception raise(m) writeln(m) Coroutine currentCoro backTraceString println System exit ) assert := method( setActualBody(url fetch) setActualStatusCode(url statusCode) assertStatusCode assertBody ) assertStatusCode := method( if(actualStatusCode != expectedStatusCode, m := Sequence with(action, " action failed for \"", variant, "\" variant: \n", url url, "\nexpectedStatusCode ", expectedStatusCode asString, "\nactualStatusCode ", actualStatusCode asString, "\nactualBody ", actualBody) raise(m) ) ) assertBody := method( if(actualBody != expectedBody, m := Sequence with(action, " action failed for \"", variant, "\" variant: \n", url url, "\nexpectedBody ", expectedBody, "\nactualBody ", actualBody, "\n") raise(m) ) ) ) VDBTest := UnitTest clone do( setUp := method( url := URL with(VDBAssertion baseUrl .. "/?action=transaction") result := url post("/?action=select&op=rm /test/a?action=mkdir /test/a?action=write&key=_a&value=1 /test/a?action=write&key=_b&value=2 /test/a?action=write&key=_c&value=3 /test/b?action=mkdir /test/b?action=write&key=_a&value=4 /test/b?action=write&key=_b&value=5 /test/b?action=write&key=_c&value=6 /test/c?action=mkdir /test/c?action=write&key=_a&value=7 /test/c?action=write&key=_b&value=5 /test/c?action=write&key=_c&value=9") if(url statusCode == 500, Exception raise("Error in transaction setting up VDBTest: " .. result) ) ) //reads ReadAssertion := VDBAssertion clone setAction("read") testRead := method( ReadAssertion clone setPath("/a") addParams("key=_a") setExpectedBody("\"1\"") assert ReadAssertion clone setPath("/a") addParams("key=_b") setExpectedBody("\"2\"") assert ReadAssertion clone setPath("/a") addParams("key=_c") setExpectedBody("\"3\"") assert ReadAssertion with("missing key") setPath("/a") addParams("key=_d") setExpectedBody("null") assert ReadAssertion with("bad path") setPath("/d") addParams("key=_d") setExpectedBody("\"path does not exist: test/d\"") setExpectedStatusCode(500) assert ) SizeAssertion := VDBAssertion clone setAction("size") testSize := method( SizeAssertion clone setExpectedBody("3") assert ) SelectAssertion := VDBAssertion clone do( action ::= "select" op ::= nil queryString := method( str := resend str .. "&op=" .. op ) ) KeysAssertion := SelectAssertion clone setOp("keys") testSelectKeys := method( KeysAssertion clone setExpectedBody("""["a","b","c"]""") assert KeysAssertion with("count") addParams("count=1") setExpectedBody("""["a"]""") assert KeysAssertion with("after") addParams("after=a") setExpectedBody("""["b","c"]""") assert KeysAssertion with("before") addParams("before=b") setExpectedBody("""["a"]""") assert KeysAssertion with("out of range") addParams("after=a", "before=d") setExpectedBody("""["b","c"]""") assert KeysAssertion with("out of lower range") addParams("after=@", "before=c") setExpectedBody("""["a","b"]""") assert KeysAssertion with("out of lower and upper range") addParams("after=@", "before=d") setExpectedBody("""["a","b","c"]""") assert KeysAssertion with("out of upper, upper range") addParams("after=d", "before=f") setExpectedBody("""[]""") assert KeysAssertion with("where") addParams("whereKey=_b", "whereValue=5") setExpectedBody("""["b","c"]""") assert KeysAssertion with("matching range, non matching where") addParams("after=@", "before=b", "whereKey=_a", "whereValue=-1") setExpectedBody("""[]""") assert KeysAssertion with("non-matching where") addParams("whereKey=_a", "whereValue=10") setExpectedBody("[]") assert ) PairsAssertion := SelectAssertion clone setOp("pairs") testSelectPairs := method( PairsAssertion clone setExpectedBody("""[["a",{"_a":"1","_b":"2","_c":"3"}],["b",{"_a":"4","_b":"5","_c":"6"}],["c",{"_a":"7","_b":"5","_c":"9"}]]""") assert PairsAssertion with("count") addParams("count=1") setExpectedBody("""[["a",{"_a":"1","_b":"2","_c":"3"}]]""") assert PairsAssertion with("after") addParams("after=a") setExpectedBody("""[["b",{"_a":"4","_b":"5","_c":"6"}],["c",{"_a":"7","_b":"5","_c":"9"}]]""") assert PairsAssertion with("before") addParams("before=b") setExpectedBody("""[["a",{"_a":"1","_b":"2","_c":"3"}]]""") assert PairsAssertion with("out of range") addParams("after=a", "before=d") setExpectedBody("""[["b",{"_a":"4","_b":"5","_c":"6"}],["c",{"_a":"7","_b":"5","_c":"9"}]]""") assert PairsAssertion with("where") addParams("whereKey=_b", "whereValue=5") setExpectedBody("""[["b",{"_a":"4","_b":"5","_c":"6"}],["c",{"_a":"7","_b":"5","_c":"9"}]]""") assert PairsAssertion with("non-matching where") addParams("whereKey=_a", "whereValue=10") setExpectedBody("[]") assert ) ValuesAssertion := SelectAssertion clone setOp("values") testSelectValues := method( ValuesAssertion clone setExpectedBody("""[{"_a":"1","_b":"2","_c":"3"},{"_a":"4","_b":"5","_c":"6"},{"_a":"7","_b":"5","_c":"9"}]""") assert ValuesAssertion with("count") addParams("count=1") setExpectedBody("""[{"_a":"1","_b":"2","_c":"3"}]""") assert ValuesAssertion with("after") addParams("after=a") setExpectedBody("""[{"_a":"4","_b":"5","_c":"6"},{"_a":"7","_b":"5","_c":"9"}]""") assert ValuesAssertion with("before") addParams("before=b") setExpectedBody("""[{"_a":"1","_b":"2","_c":"3"}]""") assert ValuesAssertion with("out of range") addParams("after=a", "before=d") setExpectedBody("""[{"_a":"4","_b":"5","_c":"6"},{"_a":"7","_b":"5","_c":"9"}]""") assert ValuesAssertion with("where") addParams("whereKey=_b", "whereValue=5") setExpectedBody("""[{"_a":"4","_b":"5","_c":"6"},{"_a":"7","_b":"5","_c":"9"}]""") assert ValuesAssertion with("non-matching where") addParams("whereKey=_a", "whereValue=10") setExpectedBody("[]") assert ) testSelectValuesWithBeforeUsingTimstamps := method( url := URL with(VDBAssertion baseUrl .. "/?action=transaction") result := url post("/?action=select&op=rm /test/2009-10-28@19:49:54.426298?action=mkdir /test/2009-10-28@20:50:37.286256?action=mkdir /test/2009-10-28@21:50:40.701332?action=mkdir /test/2009-10-28@22:50:43.140329?action=mkdir /test/2009-10-29@04:21:29.198273?action=mkdir /test/2009-10-29@05:21:31.891355?action=mkdir /test/2009-10-29@10:34:43.125098?action=mkdir /test/2009-10-29@11:34:46.198658?action=mkdir /test/2009-10-29@16:34:57.237118?action=mkdir /test/2009-10-29@17:35:00.146650?action=mkdir") if(url statusCode == 500, Exception raise("Error in transaction setting up testSelectValuesWithBeforeUsingTimstamps: " .. result) ) ValuesAssertion with("before") addParams("before=ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ", "count=1") setExpectedBody("[{}]") assert ) CountAssertion := SelectAssertion clone setOp("count") testSelectCount := method( CountAssertion clone setExpectedBody("3") assert CountAssertion with("count") addParams("count=1") setExpectedBody("1") assert CountAssertion with("after") addParams("after=a") setExpectedBody("2") assert CountAssertion with("before") addParams("before=b") setExpectedBody("1") assert CountAssertion with("out of range") addParams("after=a", "before=d") setExpectedBody("2") assert CountAssertion with("where") addParams("whereKey=_b", "whereValue=5") setExpectedBody("2") assert CountAssertion with("non-matching where") addParams("whereKey=_a", "whereValue=10") setExpectedBody("0") assert ) testSelectCountWithAfterUsingTimstamps := method( url := URL with(VDBAssertion baseUrl .. "/?action=transaction") result := url post("/?action=select&op=rm /test/2009-10-28@19:49:54.426298?action=mkdir /test/2009-10-28@20:50:37.286256?action=mkdir /test/2009-10-28@21:50:40.701332?action=mkdir /test/2009-10-28@22:50:43.140329?action=mkdir /test/2009-10-29@04:21:29.198273?action=mkdir /test/2009-10-29@05:21:31.891355?action=mkdir /test/2009-10-29@10:34:43.125098?action=mkdir /test/2009-10-29@11:34:46.198658?action=mkdir /test/2009-10-29@16:34:57.237118?action=mkdir /test/2009-10-29@17:35:00.146650?action=mkdir") if(url statusCode == 500, Exception raise("Error in transaction setting up testSelectCountWithAfterUsingTimstamps: " .. result) ) CountAssertion with("after") addParams("after=2009-10-29@12:46:17.533484") setExpectedBody("2") assert ) testSelectCountWithBeforeAndAfter := method( url := URL with(VDBAssertion baseUrl .. "/?action=transaction") result := url post("/?action=select&op=rm /test/2009-10-31@07:03:54.641231?action=mkdir") if(url statusCode == 500, Exception raise("Error in transaction setting up testSelectCountWithBeforeAndAfter: " .. result) ) CountAssertion addParams("after=2009-10-17@07:14:11.547574", "before=2009-10-31@06:44:11.547646") setExpectedBody("0") assert ) SizesAssertion := SelectAssertion clone setOp("sizes") testSelectSizes := method( SizesAssertion clone setExpectedBody("""{"a":3,"b":3,"c":3}""") assert SizesAssertion with("count") addParams("count=1") setExpectedBody("""{"a":3}""") assert SizesAssertion with("after") addParams("after=a") setExpectedBody("""{"b":3,"c":3}""") assert SizesAssertion with("before") addParams("before=b") setExpectedBody("""{"a":3}""") assert SizesAssertion with("where") addParams("whereKey=_b", "whereValue=5") setExpectedBody("""{"b":3,"c":3}""") assert SizesAssertion with("non-matching where") addParams("whereKey=_a", "whereValue=10") setExpectedBody("{}") assert ) RmAssertion := SelectAssertion clone setOp("rm") testSelectRm := method( RmAssertion clone setExpectedBody("3") assert PairsAssertion with("rm") setExpectedBody("[]") assert setUp RmAssertion with("count") addParams("count=1") setExpectedBody("1") assert PairsAssertion with("rm count") setExpectedBody("""[["b",{"_a":"4","_b":"5","_c":"6"}],["c",{"_a":"7","_b":"5","_c":"9"}]]""") assert setUp RmAssertion with("after") addParams("after=a") setExpectedBody("2") assert PairsAssertion with("rm after") setExpectedBody("""[["a",{"_a":"1","_b":"2","_c":"3"}]]""") assert setUp RmAssertion with("before") addParams("before=b") setExpectedBody("1") assert PairsAssertion with("rm before") setExpectedBody("""[["b",{"_a":"4","_b":"5","_c":"6"}],["c",{"_a":"7","_b":"5","_c":"9"}]]""") assert setUp RmAssertion with("where") addParams("whereKey=_b", "whereValue=5") setExpectedBody("2") assert PairsAssertion with("rm where") setExpectedBody("""[["a",{"_a":"1","_b":"2","_c":"3"}]]""") assert setUp RmAssertion with("non-matching where") addParams("whereKey=_a", "whereValue=10") setExpectedBody("0") assert PairsAssertion with("rm non-matching where") setExpectedBody("""[["a",{"_a":"1","_b":"2","_c":"3"}],["b",{"_a":"4","_b":"5","_c":"6"}],["c",{"_a":"7","_b":"5","_c":"9"}]]""") assert ) ObjectAssertion := SelectAssertion clone setOp("object") testSelectObject := method( ObjectAssertion clone setPath("/a") setExpectedBody("""{"_a":"1","_b":"2","_c":"3"}""") assert ) //writes WriteAssertion := VDBAssertion clone setAction("write") testWrite := method( WriteAssertion clone setPath("/a") addParams("key=_d", "value=4") setExpectedBody("null") assert ObjectAssertion with("write") clone setPath("/a") setExpectedBody("""{"_a":"1","_b":"2","_c":"3","_d":"4"}""") assert WriteAssertion with("overwrite") setPath("/a") addParams("key=_d", "value=5") setExpectedBody("null") assert ObjectAssertion with("write") clone setPath("/a") setExpectedBody("""{"_a":"1","_b":"2","_c":"3","_d":"5"}""") assert WriteAssertion with("write append") setPath("/a") addParams("key=_d", "value=6", "mode=append") setExpectedBody("null") assert ObjectAssertion with("write") clone setPath("/a") setExpectedBody("""{"_a":"1","_b":"2","_c":"3","_d":"56"}""") assert ) LinkAssertion := VDBAssertion clone setAction("link") testLink := method( LinkAssertion clone setPath("/a") addParams("toPath=/test", "key=d") setExpectedBody("null") assert ObjectAssertion with("link") clone setPath("/a") setExpectedBody("""{"_a":"1","_b":"2","_c":"3"}""") assert ) QueuePopToAssertion := VDBAssertion clone setAction("queuePopTo") testQueuePopTo := method( u := URL with(VDBAssertion baseUrl .. "/?action=transaction") r := u post( "/test/queue/waiting?action=mkdir /test/queue/waiting/a?action=mkdir /test/queue/waiting/a?action=write&key=_a&value=1 /test/queue/waiting/b?action=mkdir /test/queue/waiting/b?action=write&key=_a&value=2 /test/queue/active?action=mkdir") if(u statusCode != 200, Exception raise("setup transaction fails in testQueuePopTo: ", r) ) QueuePopToAssertion with("first") setPath("/queue/waiting") addParams("toPath=/test/queue/active") setExpectedBody("\"a\"") assert KeysAssertion with("first queuePopTo") clone setPath("/queue/active/a") setExpectedBody("""["_a","_qexpire","_qtime"]""") assert QueuePopToAssertion with("second") setPath("/queue/waiting") addParams("toPath=/test/queue/active") setExpectedBody("\"b\"") assert KeysAssertion with("second queuePopTo") clone setPath("/queue/active/b") setExpectedBody("""["_a","_qexpire","_qtime"]""") assert QueuePopToAssertion with("third") setPath("/queue/waiting") addParams("toPath=/test/queue/active") setExpectedBody("null") assert SizeAssertion with("third queuePopTo waiting") clone setPath("/queue/waiting") setExpectedBody("0") assert SizeAssertion with("third queuePopTo active") clone setPath("/queue/active") setExpectedBody("2") assert ) testQueuePopToWithTimestamps := method( return url := URL with(VDBAssertion baseUrl .. "/?action=transaction") result := url post("/?action=select&op=rm /test/active?action=mkdir /test/waiting/2009-10-28@19:49:54.426298?action=mkdir /test/waiting/2009-10-28@20:50:37.286256?action=mkdir /test/waiting/2009-10-28@21:50:40.701332?action=mkdir /test/waiting/2009-10-28@22:50:43.140329?action=mkdir /test/waiting/2009-10-29@04:21:29.198273?action=mkdir /test/waiting/2009-10-29@05:21:31.891355?action=mkdir /test/waiting/2009-10-29@10:34:43.125098?action=mkdir /test/waiting/2009-10-29@11:34:46.198658?action=mkdir /test/waiting/2009-10-29@16:34:57.237118?action=mkdir /test/waiting/2009-10-29@17:35:00.146650?action=mkdir") if(url statusCode == 500, Exception raise("Error in transaction setting up testQueuePopToWithTimestamps: " .. result) ) QueuePopToAssertion clone setPath("/waiting") addParams("toPath=/test/active") setExpectedBody("\"2009-10-28@19:49:54.426298\"") assert SizeAssertion clone setPath("/active") setExpectedBody("1") assert SizeAssertion clone setPath("/waiting") setExpectedBody("9") assert ) testQueueExpireToShouldNotEmptyToPath := method( url := URL with(VDBAssertion baseUrl .. "/?action=transaction") result := url post("/?action=select&op=rm /test/active?action=mkdir /test/waiting/2009-10-28@19:49:54.426298?action=mkdir /test/waiting/2009-10-28@20:50:37.286256?action=mkdir /test/waiting/2009-10-28@21:50:40.701332?action=mkdir /test/waiting/2009-10-28@22:50:43.140329?action=mkdir /test/waiting/2009-10-29@04:21:29.198273?action=mkdir /test/waiting/2009-10-29@05:21:31.891355?action=mkdir /test/waiting/2009-10-29@10:34:43.125098?action=mkdir /test/waiting/2009-10-29@11:34:46.198658?action=mkdir /test/waiting/2009-10-29@16:34:57.237118?action=mkdir /test/waiting/2009-10-29@17:35:00.146650?action=mkdir") if(url statusCode == 500, Exception raise("Error in transaction setting up testQueuePopToWithTimestamps: " .. result) ) QueueExpireToAssertion clone setPath("/active") addParams("toPath=/test/waiting") setExpectedBody("0") assert SizeAssertion clone setPath("/active") setExpectedBody("0") assert SizeAssertion clone setPath("/waiting") setExpectedBody("10") assert ) QueueExpireToAssertion := VDBAssertion clone setAction("queueExpireTo") testQueueExpireTo := method( u := URL with(VDBAssertion baseUrl .. "/?action=transaction") r := u post( "/test/queue/waiting?action=mkdir /test/queue/active?action=mkdir /test/queue/active/a?action=mkdir /test/queue/active/a?action=write&key=_a&value=1 /test/queue/active/a?action=write&key=_qexpire&value=0000000000 /test/queue/active/a?action=write&key=_qtime&value=0000000000 /test/queue/active/b?action=mkdir /test/queue/active/b?action=write&key=_a&value=2 /test/queue/active/b?action=write&key=_qexpire&value=2000000000 /test/queue/active/b?action=write&key=_qtime&value=2000000000") if(u statusCode != 200, Exception raise("setup transaction fails in testQueueExpireTo: ", r) ) //assert(URL with("http://localhost:9523/test/active?action=queueExpireTo&toPath=/test/waiting") fetch == "1") QueueExpireToAssertion with("first") setPath("/queue/active") addParams("toPath=/test/queue/waiting") setExpectedBody("1") assert ObjectAssertion with("first queueExpireTo") setPath("/queue/waiting/a") setExpectedBody("""{"_a":"1"}""") assert QueueExpireToAssertion with("second") setPath("/queue/active") addParams("toPath=/test/queue/waiting") setExpectedBody("0") assert KeysAssertion with("second queueExpireTo") setPath("/queue/active/b") setExpectedBody("""["_a","_qexpire","_qtime"]""") assert ) testAmchart := method( u := URL with(VDBAssertion baseUrl .. "/?action=transaction") r := u post( "/test/queue/waiting?action=mkdir /test/queue/active?action=mkdir /test/queue/active/a?action=mkdir /test/queue/active/a?action=write&key=_a&value=1 /test/queue/active/a?action=write&key=_qexpire&value=0000000000 /test/queue/active/a?action=write&key=_qtime&value=0000000000 /test/queue/active/b?action=mkdir /test/queue/active/b?action=write&key=_a&value=2 /test/queue/active/b?action=write&key=_qexpire&value=2000000000 /test/queue/active/b?action=write&key=_qtime&value=2000000000") if(u statusCode != 200, Exception raise("setup transaction fails in testAmchart: ", r) ) u := URL with(VDBAssertion baseUrl .. "/?action=amchart") u fetch if(u statusCode != 200, Exception raise("error in amchart fetch") ) ) testView := method( u := URL with(VDBAssertion baseUrl .. "/?action=transaction") r := u post( "/test/queue/waiting?action=mkdir /test/queue/active?action=mkdir /test/queue/active/a?action=mkdir /test/queue/active/a?action=write&key=_a&value=1 /test/queue/active/a?action=write&key=_qexpire&value=0000000000 /test/queue/active/a?action=write&key=_qtime&value=0000000000 /test/queue/active/b?action=mkdir /test/queue/active/b?action=write&key=_a&value=2 /test/queue/active/b?action=write&key=_qexpire&value=2000000000 /test/queue/active/b?action=write&key=_qtime&value=2000000000") if(u statusCode != 200, Exception raise("setup transaction fails in testView: ", r) ) u := URL with(VDBAssertion baseUrl .. "/") u fetch if(u statusCode != 200, Exception raise("error in view fetch") ) ) testMeta := method( URL with(VDBAssertion baseUrl .. "/?action=write&key=_type&value=Root&mode=meta") fetch r := URL with(VDBAssertion baseUrl .. "/?action=read&key=_type&mode=meta") fetch if(r containsSeq("Root") not, Exception raise("meta data not read")) ) testSpaceInPath := method( URL with(VDBAssertion baseUrl .. "/test/spacedPath/foo%20bar?action=mkdir") fetch URL with(VDBAssertion baseUrl .. "/test/spacedPath/foo%20bar?action=write&key=_baz&value=bam") fetch VDBAssertion clone setVariant("space in path") setPath("/spacedPath/foo%20bar") setAction("read") addParams("key=_baz") setExpectedBody("\"bam\"") assert VDBAssertion clone setVariant("space in keys") setPath("/spacedPath") setAction("select") addParams("op=keys") setExpectedBody("""["foo bar"]""") assert ) testAMChart := method( r := URL with(VDBAssertion baseUrl .. "/?action=amchart") fetch if(r containsSeq("graph") not, Exception raise("chart error")) r := URL with(VDBAssertion baseUrl .. "/?action=amchart&slot1=bar") fetch if(r containsSeq("graph") not, Exception raise("chart error")) r := URL with(VDBAssertion baseUrl .. "/?action=amchart&subpath=foo&slot1=bar") fetch if(r containsSeq("graph") not, Exception raise("chart error")) ) ) assert := method(v, v ifFalse(Exception raise("error"))) CollectGarbageTest := UnitTest clone do( CollectGarbageAssertion := VDBAssertion clone setAction("collectGarbage") do( expectedBodyPrefix ::= nil assertBody := method( /* if(actualBody beginsWithSeq(expectedBodyPrefix) not, m := Sequence with(action, " action failed for \"", variant, "\" variant: \n", url url, "\nexpectedBodyPrefix ", expectedBodyPrefix, "\nactualBody ", actualBody, "\n") raise(m) ) */ ) ) testCollectGarbage := method( URL with(VDBAssertion baseUrl .. "/?action=select&op=rm") fetch URL with(VDBAssertion baseUrl .. "/?action=collectGarbage") fetch URL with(VDBAssertion baseUrl .. "/a/b?action=mkdir") fetch URL with(VDBAssertion baseUrl .. "/a/c?action=mkdir") fetch URL with(VDBAssertion baseUrl .. "/a/d?action=mkdir") fetch URL with(VDBAssertion baseUrl .. "/a?action=select&op=rm") fetch CollectGarbageAssertion setBasePath("/") setExpectedBodyPrefix("""{"saved":2,"seconds":""") assert ) testWriteDuringCollection := method( URL with(VDBAssertion baseUrl .. "/?action=select&op=rm") fetch URL with(VDBAssertion baseUrl .. "/test/gc?action=mkdir") fetch nodes := List clone 10000 repeat(i, nodes append("/test/gc/" .. i .. "?action=mkdir") nodes append("/test/gc/" .. i .. "?action=write&key=_a&value=b") ) url := URL with(VDBAssertion baseUrl .. "/?action=transaction") url post(nodes join("\n")) URL with(VDBAssertion baseUrl .. "/?action=collectGarbage") fetch if(File with("/tmp/db.tc") exists not, Exception raise("Expected /tmp/db.tc to exist. Perhaps collect finished already?") ) url := URL with(VDBAssertion baseUrl .. "/?action=transaction") url post("/test/gc/9999999999?action=mkdir\n/test/gc/9999999999?action=write&key=_b&value=c") while(File with("/tmp/db.tc") exists, System sleep(.1) ) if(URL with(VDBAssertion baseUrl .. "/test/gc/9999999999?action=read&key=_b") fetch != "\"c\"", Exception raise("Expected /test/gc/9999999999 to contain slot _b with value c after GC") ) ) ) writeln("starting Vertex on port 9523") System system("rm /tmp/test.tc") System system("build/Debug/Vertex -port 9523 -db /tmp/test.tc &") writeln("waiting 5 seconds for db to start") System wait(5) try( VDBTest run CollectGarbageTest run ) writeln("shutting down Vertex on port 9523") URL with("http://localhost:9523?action=shutdown") fetch System system("rm /tmp/test.tc")
Io
5
stevedekorte/vertexdb
tests/test.io
[ "BSD-3-Clause" ]
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Samuel Attard <sattard@slack-corp.com> Date: Mon, 15 Jul 2019 17:45:02 -0700 Subject: chore: read _noBrowserGlobals from global not config This is used so that we can modify the flag at runtime where config can only be set at compile time. diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js index ef06d0563fa7452348754418867a56c9b8c6f4e1..a313402f93937cf2f1f93eb74422d9609e291d76 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -193,7 +193,7 @@ const { queueMicrotask } = require('internal/process/task_queues'); -if (!config.noBrowserGlobals) { +if (!global._noBrowserGlobals) { // Override global console from the one provided by the VM // to the one implemented by Node.js // https://console.spec.whatwg.org/#console-namespace
Diff
3
TarunavBA/electron
patches/node/chore_read_nobrowserglobals_from_global_not_process.patch
[ "MIT" ]
package com.baeldung.annotations; import java.util.Properties; import org.springframework.context.annotation.Conditional; import org.springframework.context.annotation.Configuration; @Configuration public class ConditionalBeanConfiguration { @Conditional(HibernateCondition.class) Properties additionalProperties() { // application specific properties return new Properties(); } }
Java
4
DBatOWL/tutorials
spring-boot-modules/spring-boot-annotations/src/main/java/com/baeldung/annotations/ConditionalBeanConfiguration.java
[ "MIT" ]
<template name="icon"> <svg class="rc-icon {{block}} {{block}}--{{icon}} {{classes}}" aria-hidden="true"> <use xlink:href="{{baseUrl}}#icon-{{icon}}"></use> </svg> </template>
HTML
3
subramanir2143/Rocket.Chat
app/ui/client/components/icon.html
[ "MIT" ]
option solver cplex; option cplex_options "time=86400"; # 1day option cplex_options "display=1"; option cplex_options 'mipdisplay 2 mipinterval 1000';
AMPL
3
thuenen/State-Elimination-for-Mixed-Integer-Optimal-Control-of-PDEs-by-Semigroup-Theory
HeatCtrl/cplex.ampl
[ "MIT" ]
--TEST-- round() works correctly for large exponents --FILE-- <?php var_dump (2e-22 == round (2e-22, 22, PHP_ROUND_HALF_UP)); var_dump (1e-22 == round (1e-22, 22, PHP_ROUND_HALF_UP)); var_dump (2e-23 == round (2e-23, 23, PHP_ROUND_HALF_UP)); var_dump (1e-23 == round (1e-23, 23, PHP_ROUND_HALF_UP)); var_dump (2e-24 == round (2e-24, 24, PHP_ROUND_HALF_UP)); var_dump (1e-24 == round (1e-24, 24, PHP_ROUND_HALF_UP)); var_dump (2e22 == round (2e22, -22, PHP_ROUND_HALF_UP)); var_dump (1e22 == round (1e22, -22, PHP_ROUND_HALF_UP)); var_dump (2e23 == round (2e23, -23, PHP_ROUND_HALF_UP)); var_dump (1e23 == round (1e23, -23, PHP_ROUND_HALF_UP)); var_dump (2e24 == round (2e24, -24, PHP_ROUND_HALF_UP)); var_dump (1e24 == round (1e24, -24, PHP_ROUND_HALF_UP)); ?> --EXPECT-- bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true)
PHP
4
guomoumou123/php5.5.10
ext/standard/tests/math/round_large_exp.phpt
[ "PHP-3.01" ]
#tag Class Private Class NSRegularExpression Inherits NSObject #tag Method, Flags = &h21 Private Shared Function ClassRef() As Ptr static ref as ptr = NSClassFromString("NSRegularExpression") return ref End Function #tag EndMethod #tag Method, Flags = &h0 Sub Constructor(pattern as CFStringRef, options as UInt32, byref error as NSError) declare function initWithPattern_ lib FoundationLib selector "initWithPattern:options:error:" (obj_id as ptr, pattern as CFStringRef, options as UInt32, error as ptr) as ptr dim err as ptr Super.Constructor( initWithPattern_(Allocate(ClassRef), pattern, options, err) ) if err <> nil then error = new NSError(err) end if End Sub #tag EndMethod #tag Method, Flags = &h0 Function FirstMatchInStringOptionsRange(string as CFStringRef, options as UInt32, range as NSRange) As NSTextCheckingResult declare function firstMatchInString_ lib FoundationLib selector "firstMatchInString:options:range:" (obj_id as ptr, string as CFStringRef, options as UInt32, range as NSRange) as ptr dim r as ptr = firstMatchInString_(self, string, options, range) if r <> nil then Return new NSTextCheckingResult(r) else Return nil end if End Function #tag EndMethod #tag Method, Flags = &h0 Function MatchesInStringOptionsRange(string as CFStringRef, options as UInt32, range as NSRange) As NSArray declare function matchesInString_ lib FoundationLib selector "matchesInString:options:range:" (obj_id as ptr, string as CFStringRef, options as UInt32, range as NSRange) as ptr Return new NSArray(matchesInString_(self, string, options, range)) End Function #tag EndMethod #tag Method, Flags = &h0 Function NumberOfMatchesInStringOptionsRange(string as CFStringRef, options as UInt32, range as NSRange) As UInteger declare function numberOfMatchesInString_ lib FoundationLib selector "numberOfMatchesInString:options:range:" (obj_id as ptr, string as CFStringRef, options as UInt32, range as NSRange) as UInteger Return numberOfMatchesInString_(self, string, options, range) End Function #tag EndMethod #tag Method, Flags = &h0 Function RangeOfFirstMatchInStringOptionsRange(string as CFStringRef, options as UInt32, range as NSRange) As NSRange declare function rangeOfFirstMatchInString_ lib FoundationLib selector "rangeOfFirstMatchInString:options:range:" (obj_id as ptr, string as CFStringRef, options as UInt32, range as NSRange) as NSRange Return (rangeOfFirstMatchInString_(self, string, options, range)) End Function #tag EndMethod #tag Method, Flags = &h0 Function ReplacementStringForResultInStringOffsetTemplate(result as NSTextCheckingResult, string as CFStringRef, offset as Integer, template as CFStringRef) As Text declare function replacementStringForResult_ lib FoundationLib selector "replacementStringForResult:inString:offset:template:" (obj_id as ptr, result as ptr, string as CFStringRef, offset as Integer, template as CFStringRef) as CFStringRef Return replacementStringForResult_(self, result, string, offset, template) End Function #tag EndMethod #tag Method, Flags = &h0 Function StringByReplacingMatchesInStringOptionsRangeWithTemplate(string as CFStringRef, options as UInt32, range as NSRange, template as CFStringRef) As Text declare function stringByReplacingMatchesInString_ lib FoundationLib selector "stringByReplacingMatchesInString:options:range:withTemplate:" (obj_id as ptr, string as CFStringRef, options as UInt32, range as NSRange, template as CFStringRef) as CFStringRef Return stringByReplacingMatchesInString_(self, string, options, range, template) End Function #tag EndMethod #tag ComputedProperty, Flags = &h0 #tag Getter Get declare function numberOfCaptureGroups_ lib FoundationLib selector "numberOfCaptureGroups" (obj_id as ptr) as UInteger Return numberOfCaptureGroups_(self) End Get #tag EndGetter numberOfCaptureGroups As UInteger #tag EndComputedProperty #tag ComputedProperty, Flags = &h0 #tag Getter Get declare function options_ lib FoundationLib selector "options" (obj_id as ptr) as UInt32 Return (options_(self)) End Get #tag EndGetter options As UInt32 #tag EndComputedProperty #tag ComputedProperty, Flags = &h0 #tag Getter Get declare function pattern_ lib FoundationLib selector "pattern" (obj_id as ptr) as CFStringRef Return pattern_(self) End Get #tag EndGetter pattern As CFStringRef #tag EndComputedProperty #tag ViewBehavior #tag ViewProperty Name="Index" Visible=true Group="ID" InitialValue="-2147483648" Type="Integer" EditorType="" #tag EndViewProperty #tag ViewProperty Name="Left" Visible=true Group="Position" InitialValue="0" Type="Integer" EditorType="" #tag EndViewProperty #tag ViewProperty Name="Name" Visible=true Group="ID" InitialValue="" Type="String" EditorType="" #tag EndViewProperty #tag ViewProperty Name="Super" Visible=true Group="ID" InitialValue="" Type="String" EditorType="" #tag EndViewProperty #tag ViewProperty Name="Top" Visible=true Group="Position" InitialValue="0" Type="Integer" EditorType="" #tag EndViewProperty #tag ViewProperty Name="numberOfCaptureGroups" Visible=false Group="Behavior" InitialValue="" Type="UInteger" EditorType="" #tag EndViewProperty #tag ViewProperty Name="options" Visible=false Group="Behavior" InitialValue="" Type="UInt32" EditorType="" #tag EndViewProperty #tag EndViewBehavior End Class #tag EndClass
Xojo
4
kingj5/iOSKit
Modules/JKRegEx/NSRegularExpression.xojo_code
[ "MIT" ]
Han = require \../index Han!.render!
LiveScript
1
ForkYard/Han
demo/test-commonjs.ls
[ "MIT" ]
' Licensed to the .NET Foundation under one or more agreements. ' The .NET Foundation licenses this file to you under the MIT license. ' See the LICENSE file in the project root for more information. Imports System.Collections.Immutable Imports Microsoft.CodeAnalysis.VisualBasic.Symbols Imports Roslyn.Utilities Namespace Microsoft.CodeAnalysis.VisualBasic.ExpressionEvaluator Friend NotInheritable Class EETypeParameterSymbol Inherits SubstitutableTypeParameterSymbol Private ReadOnly _container As Symbol Private ReadOnly _sourceTypeParameterSymbol As TypeParameterSymbol Private ReadOnly _ordinal As Integer Private ReadOnly _getTypeParameterMap As Func(Of TypeSubstitution) Public Sub New( container As Symbol, sourceTypeParameterSymbol As TypeParameterSymbol, ordinal As Integer, getTypeParameterMap As Func(Of TypeSubstitution)) Debug.Assert(container.Kind = SymbolKind.NamedType OrElse container.Kind = SymbolKind.Method) _container = container _sourceTypeParameterSymbol = sourceTypeParameterSymbol _ordinal = ordinal _getTypeParameterMap = getTypeParameterMap End Sub Public Overrides ReadOnly Property ContainingSymbol As Symbol Get Return _container End Get End Property Public Overrides ReadOnly Property Name As String Get Return _sourceTypeParameterSymbol.GetUnmangledName() End Get End Property Public Overrides ReadOnly Property DeclaringSyntaxReferences As ImmutableArray(Of SyntaxReference) Get Throw ExceptionUtilities.Unreachable End Get End Property Public Overrides ReadOnly Property HasConstructorConstraint As Boolean Get Return _sourceTypeParameterSymbol.HasConstructorConstraint End Get End Property Public Overrides ReadOnly Property HasReferenceTypeConstraint As Boolean Get Return _sourceTypeParameterSymbol.HasReferenceTypeConstraint End Get End Property Public Overrides ReadOnly Property HasValueTypeConstraint As Boolean Get Return _sourceTypeParameterSymbol.HasValueTypeConstraint End Get End Property Public Overrides ReadOnly Property Locations As ImmutableArray(Of Location) Get Throw ExceptionUtilities.Unreachable End Get End Property Public Overrides ReadOnly Property Ordinal As Integer Get Return _ordinal End Get End Property Public Overrides ReadOnly Property TypeParameterKind As TypeParameterKind Get Throw ExceptionUtilities.Unreachable End Get End Property Public Overrides ReadOnly Property Variance As VarianceKind Get Return _sourceTypeParameterSymbol.Variance End Get End Property Public Overrides ReadOnly Property IsImplicitlyDeclared As Boolean Get Return True End Get End Property Friend Overrides Sub EnsureAllConstraintsAreResolved() _sourceTypeParameterSymbol.EnsureAllConstraintsAreResolved() End Sub Friend Overrides ReadOnly Property ConstraintTypesNoUseSiteDiagnostics As ImmutableArray(Of TypeSymbol) Get Dim constraintTypes = _sourceTypeParameterSymbol.ConstraintTypesNoUseSiteDiagnostics If constraintTypes.IsEmpty Then Return ImmutableArray(Of TypeSymbol).Empty End If ' Remap constraints from _sourceTypeParameterSymbol since constraints ' may be defined in terms of other type parameters. Dim substitution = _getTypeParameterMap() Debug.Assert(substitution IsNot Nothing, "Expected substitution to have been populated.") Return InternalSubstituteTypeParametersDistinct(substitution, constraintTypes) End Get End Property End Class End Namespace
Visual Basic
4
Cadris/roslyn
src/ExpressionEvaluator/VisualBasic/Source/ExpressionCompiler/Symbols/EETypeParameterSymbol.vb
[ "MIT" ]
2016-01-20 22:36:16 - irc: connecting to server irc.nixers.net/6697 (SSL)... 2016-01-20 22:36:18 - gnutls: connected using 2048-bit Diffie-Hellman shared secret exchange 2016-01-20 22:36:18 - gnutls: receiving 2 certificates 2016-01-20 22:36:18 - - certificate[1] info: 2016-01-20 22:36:18 - - subject `C=NO,CN=irc.unix.chat,EMAIL=hostmaster@unix.chat', issuer `C=IL,O=StartCom Ltd.,OU=Secure Digital Certificate Signing,CN=StartCom Class 1 Primary Intermediate Server CA', RSA key 2048 bits, signed using RSA-SHA256, activated `2015-09-03 23:24:42 UTC', expires `2016-09-03 02:08:01 UTC', SHA-1 fingerprint `421f6bf27af857a513db7dabea04bf9e5cb3d831' 2016-01-20 22:36:18 - - certificate[2] info: 2016-01-20 22:36:18 - - subject `C=IL,O=StartCom Ltd.,OU=Secure Digital Certificate Signing,CN=StartCom Class 1 Primary Intermediate Server CA', issuer `C=IL,O=StartCom Ltd.,OU=Secure Digital Certificate Signing,CN=StartCom Certification Authority', RSA key 2048 bits, signed using RSA-SHA256, activated `2007-10-14 20:54:17 UTC', expires `2022-10-14 20:54:17 UTC', SHA-1 fingerprint `0ad38a30abc0f0b605b45c727a90819e7ff9daf4' 2016-01-20 22:36:18 !!! gnutls: the hostname in the certificate does NOT match "irc.nixers.net" 2016-01-20 22:36:18 - gnutls: peer's certificate is trusted 2016-01-20 22:36:18 !!! irc: TLS handshake failed 2016-01-20 22:36:18 !!! irc: error: Error in the certificate. 2016-01-20 22:36:18 - irc: reconnecting to server in 10 seconds 2016-01-20 22:36:28 - irc: reconnecting to server... 2016-01-20 22:36:28 - irc: connecting to server irc.nixers.net/6697 (SSL)... 2016-01-20 22:36:29 - gnutls: connected using 2048-bit Diffie-Hellman shared secret exchange 2016-01-20 22:36:29 - gnutls: receiving 2 certificates 2016-01-20 22:36:29 - - certificate[1] info: 2016-01-20 22:36:29 - - subject `C=NO,CN=irc.unix.chat,EMAIL=hostmaster@unix.chat', issuer `C=IL,O=StartCom Ltd.,OU=Secure Digital Certificate Signing,CN=StartCom Class 1 Primary Intermediate Server CA', RSA key 2048 bits, signed using RSA-SHA256, activated `2015-09-03 23:24:42 UTC', expires `2016-09-03 02:08:01 UTC', SHA-1 fingerprint `421f6bf27af857a513db7dabea04bf9e5cb3d831' 2016-01-20 22:36:29 - - certificate[2] info: 2016-01-20 22:36:29 - - subject `C=IL,O=StartCom Ltd.,OU=Secure Digital Certificate Signing,CN=StartCom Class 1 Primary Intermediate Server CA', issuer `C=IL,O=StartCom Ltd.,OU=Secure Digital Certificate Signing,CN=StartCom Certification Authority', RSA key 2048 bits, signed using RSA-SHA256, activated `2007-10-14 20:54:17 UTC', expires `2022-10-14 20:54:17 UTC', SHA-1 fingerprint `0ad38a30abc0f0b605b45c727a90819e7ff9daf4' 2016-01-20 22:36:29 !!! gnutls: the hostname in the certificate does NOT match "irc.nixers.net" 2016-01-20 22:36:29 - gnutls: peer's certificate is trusted 2016-01-20 22:36:29 !!! irc: TLS handshake failed 2016-01-20 22:36:29 !!! irc: error: Error in the certificate. 2016-01-20 22:36:29 - irc: reconnecting to server in 20 seconds 2016-01-20 22:36:49 - irc: reconnecting to server... 2016-01-20 22:36:49 - irc: connecting to server irc.nixers.net/6697 (SSL)... 2016-01-20 22:36:50 - gnutls: connected using 2048-bit Diffie-Hellman shared secret exchange 2016-01-20 22:36:50 - gnutls: receiving 2 certificates 2016-01-20 22:36:50 - - certificate[1] info: 2016-01-20 22:36:50 - - subject `C=NO,CN=irc.unix.chat,EMAIL=hostmaster@unix.chat', issuer `C=IL,O=StartCom Ltd.,OU=Secure Digital Certificate Signing,CN=StartCom Class 1 Primary Intermediate Server CA', RSA key 2048 bits, signed using RSA-SHA256, activated `2015-09-03 23:24:42 UTC', expires `2016-09-03 02:08:01 UTC', SHA-1 fingerprint `421f6bf27af857a513db7dabea04bf9e5cb3d831' 2016-01-20 22:36:50 - - certificate[2] info: 2016-01-20 22:36:50 - - subject `C=IL,O=StartCom Ltd.,OU=Secure Digital Certificate Signing,CN=StartCom Class 1 Primary Intermediate Server CA', issuer `C=IL,O=StartCom Ltd.,OU=Secure Digital Certificate Signing,CN=StartCom Certification Authority', RSA key 2048 bits, signed using RSA-SHA256, activated `2007-10-14 20:54:17 UTC', expires `2022-10-14 20:54:17 UTC', SHA-1 fingerprint `0ad38a30abc0f0b605b45c727a90819e7ff9daf4' 2016-01-20 22:36:50 !!! gnutls: the hostname in the certificate does NOT match "irc.nixers.net" 2016-01-20 22:36:50 - gnutls: peer's certificate is trusted 2016-01-20 22:36:50 !!! irc: TLS handshake failed 2016-01-20 22:36:50 !!! irc: error: Error in the certificate. 2016-01-20 22:36:50 - irc: reconnecting to server in 40 seconds
IRC log
3
0x4b1dN/2016-dots
misc/weechat/logs/irc.server.nixers.weechatlog
[ "MIT" ]
package com.baeldung.junit5.templates; public class UserIdGeneratorImpl implements UserIdGenerator { private boolean isFeatureEnabled; public UserIdGeneratorImpl(boolean isFeatureEnabled) { this.isFeatureEnabled = isFeatureEnabled; } public String generate(String firstName, String lastName) { String initialAndLastName = firstName.substring(0, 1) .concat(lastName); return isFeatureEnabled ? "bael".concat(initialAndLastName) : initialAndLastName; } }
Java
4
DBatOWL/tutorials
testing-modules/junit5-annotations/src/main/java/com/baeldung/junit5/templates/UserIdGeneratorImpl.java
[ "MIT" ]
create table b (c int);
SQL
1
imtbkcat/tidb-lightning
tests/checkpoint_engines/data/cpeng.b-schema.sql
[ "Apache-2.0" ]
#!/usr/bin/env bash ## # @license Copyright 2021 The Lighthouse Authors. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ## # TODO(esmodules): delete when consumers of util.js are all esm. SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" LH_ROOT_DIR="$SCRIPT_DIR/../.." OUT_FILE="$LH_ROOT_DIR"/lighthouse-core/util-commonjs.js echo '// @ts-nocheck' > "$OUT_FILE" echo '// Auto-generated by lighthouse-core/scripts/copy-util-commonjs.sh' >> "$OUT_FILE" echo '// Temporary solution until all our code uses esmodules' >> "$OUT_FILE" sed 's/export /module.exports = /' "$LH_ROOT_DIR"/report/renderer/util.js >> "$OUT_FILE"
Shell
4
MB175/lighthouse
lighthouse-core/scripts/copy-util-commonjs.sh
[ "Apache-2.0" ]
struct RequiredField { 1: required string name } struct OtherThing { 1: required i16 value }
Thrift
2
Jimexist/thrift
lib/go/test/RequiredFieldTest.thrift
[ "Apache-2.0" ]
/* * Copyright (c) 2021, Jan de Visser <jan@de-visser.net> * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include <LibCore/Object.h> #include <LibSQL/Database.h> #include <SQLServer/Forward.h> namespace SQLServer { class DatabaseConnection final : public Core::Object { C_OBJECT(DatabaseConnection) public: ~DatabaseConnection() override = default; static RefPtr<DatabaseConnection> connection_for(int connection_id); int connection_id() const { return m_connection_id; } int client_id() const { return m_client_id; } RefPtr<SQL::Database> database() { return m_database; } void disconnect(); int sql_statement(String const& sql); private: DatabaseConnection(String database_name, int client_id); RefPtr<SQL::Database> m_database { nullptr }; String m_database_name; int m_connection_id; int m_client_id; bool m_accept_statements { false }; }; }
C
3
r00ster91/serenity
Userland/Services/SQLServer/DatabaseConnection.h
[ "BSD-2-Clause" ]
label splashscreen: scene gray90 with Pause(1) play sound 'audio/sfx/title_fire_swoosh.ogg' show learn_to_code_rpg_logo at truecenter with dissolve with Pause(2) scene gray90 with dissolve with Pause(1) scene gray90 with Pause(1) play sound 'audio/sfx/title_fire_swoosh.ogg' show fcc_logo at truecenter with dissolve with Pause(2) scene gray90 with dissolve with Pause(1) # if not persistent.language_selected: # scene black # menu: # "English": # $renpy.change_language(None) # "{font=fonts/simplified_chinese/NotoSansSC-Regular.otf}简体中文{/font}": # $renpy.change_language("simplified_chinese") # $ persistent.language_selected = True $ accessibility_tips = _p(""" Accessibility Tips: To enable auto-voicing of the text, please first configure the speech synthesis settings (speaker gender, accent, etc.) on your computer according to {a=https://www.renpy.org/doc/html/self_voicing.html#speech-synthesis}these instructions{/a}. Back to the game, you may press the {b}{u}v{/u}{/b} key to switch on auto-voicing. Adjust the volume of music and sound effects on the {icon=icon-settings} Settings screen. Press the {b}{u}Esc{/u}{/b} key to access the {icon=icon-grid}Game Menu at any time during the game. """) # use a lighter background because the hyperlinks are dark blue scene main_menu overlay with dissolve pause 1 show text "{size=48}[accessibility_tips!t]{/size}" with dissolve show screen ctc() # click to continue pause hide text with dissolve $ beta_disclaimer = _p(""" This game, {b}Learn to Code RPG{/b}, is currently in beta. If you notice any bugs or have suggestions about accessibility, the interface, the story, or anything at all, please report them on our {a=https://github.com/freeCodeCamp/LearnToCodeRPG}GitHub repo{/a}. If you are enjoying this game, please {icon=icon-thumbs-up} rate and review us on {a=https://freecodecamp.itch.io/learn-to-code-rpg}itch.io{/a} and {icon=icon-star} star our {a=https://github.com/freeCodeCamp/LearnToCodeRPG}GitHub repo{/a}. """) # use a lighter background because the hyperlinks are dark blue show text "{size=48}[beta_disclaimer!t]{/size}" with dissolve pause hide screen ctc hide text with dissolve # return control to the `start` label return
Ren'Py
3
googlebleh/LearnToCodeRPG
game/scripts/splashscreen.rpy
[ "BSD-3-Clause" ]
--TEST-- Phar front controller index.php relocate tar-based --EXTENSIONS-- phar --ENV-- SCRIPT_NAME=/frontcontroller5.phar.php REQUEST_URI=/frontcontroller5.phar.php/ PATH_INFO=/ --FILE_EXTERNAL-- files/frontcontroller.phar.tar --EXPECTHEADERS-- Status: 301 Moved Permanently Location: /frontcontroller5.phar.php/index.php --EXPECT--
PHP
2
NathanFreeman/php-src
ext/phar/tests/tar/frontcontroller5.phar.phpt
[ "PHP-3.01" ]