DINIT291 ;SFISC/MKO-FORM AND BLOCK FILES ;08DEC2015
;;22.2;VA FileMan;;Jan 05, 2016;Build 42
;;Per VA Directive 6402, this routine should not be modified.
;;Submitted to OSEHRA 5 January 2015 by the VISTA Expertise Network.
;;Based on Medsphere Systems Corporation's MSC FileMan 1051.
;;Licensed under the terms of the Apache License, Version 2.0.
;
F I=1:2 S X=$T(Q+I) Q:X="" S Y=$E($T(Q+I+1),4,999),X=$E(X,4,999) S:$A(Y)=126 I=I+1,Y=$E(Y,2,999)_$E($T(Q+I+1),5,99) S:$A(Y)=61 Y=$E(Y,2,999) S @X=Y
G ^DINIT292
Q Q
;;^DD(.403,7,1,1,3)
;;=Programmer only
;;^DD(.403,7,1,1,"%D",0)
;;=^^2^2^2900911^
;;^DD(.403,7,1,1,"%D",0,"LE")
;;=1
;;^DD(.403,7,1,1,"%D",1,0)
;;=This cross-reference is used to quickly find all ScreenMan templates
;;^DD(.403,7,1,1,"%D",2,0)
;;=associated with a file.
;;^DD(.403,7,1,1,"DT")
;;=2900911
;;^DD(.403,7,3)
;;=Answer must be 1-16 characters in length.
;;^DD(.403,7,21,0)
;;=^^2^2^2920407^
;;^DD(.403,7,21,1,0)
;;=Enter a file number, greater than or equal to 2, which represents the data
;;^DD(.403,7,21,2,0)
;;=dictionary number of the primary file for this form.
;;^DD(.403,7,"DT")
;;=2920407
;;^DD(.403,8,0)
;;=DISPLAY ONLY^SI^0:NO;1:YES;^0;9^Q
;;^DD(.403,8,21,0)
;;=^^2^2^2931027^^^^
;;^DD(.403,8,21,1,0)
;;=This is a flag that indicates none of the blocks on the form are edit
;;^DD(.403,8,21,2,0)
;;=blocks. This flag is set during form compilation.
;;^DD(.403,8,"DT")
;;=2931028
;;^DD(.403,9,0)
;;=FORM ONLY^SI^0:NO;1:YES;^0;10^Q
;;^DD(.403,9,21,0)
;;=^^2^2^2931027^
;;^DD(.403,9,21,1,0)
;;=This is a flag that indicates none of the fields on the form are data
;;^DD(.403,9,21,2,0)
;;=dictionary fields. This flag is set during form compilation.
;;^DD(.403,9,"DT")
;;=2931028
;;^DD(.403,10,0)
;;=COMPILED^SI^0:NO;1:YES;^0;11^Q
;;^DD(.403,10,1,0)
;;=^.1^^0
;;^DD(.403,10,21,0)
;;=^^2^2^2940908^
;;^DD(.403,10,21,1,0)
;;=This is a flag that indicates that the form is compiled. This flag is
;;^DD(.403,10,21,2,0)
;;=set during form compilation.
;;^DD(.403,10,"DT")
;;=2940701
;;^DD(.403,11,0)
;;=PRE ACTION^K^^11;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
;;^DD(.403,11,3)
;;=Enter standard MUMPS code which will be executed at the beginning of the form.
;;^DD(.403,11,9)
;;=@
;;^DD(.403,11,21,0)
;;=^^2^2^2940906^
;;^DD(.403,11,21,1,0)
;;=This is MUMPS code that is executed when the form is first invoked,
;;^DD(.403,11,21,2,0)
;;=before any of the pages are loaded and displayed.
;;^DD(.403,12,0)
;;=POST ACTION^K^^12;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
;;^DD(.403,12,3)
;;=Enter standard MUMPS code which will be executed at the end of the form.
;;^DD(.403,12,9)
;;=@
;;^DD(.403,12,21,0)
;;=^^2^2^2940906^^
;;^DD(.403,12,21,1,0)
;;=This is MUMPS code that is executed before ScreenMan returns to the
;;^DD(.403,12,21,2,0)
;;=calling application.
;;^DD(.403,14,0)
;;=POST SAVE^K^^14;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
;;^DD(.403,14,3)
;;=This is Standard MUMPS code.
;;^DD(.403,14,9)
;;=@
;;^DD(.403,14,21,0)
;;=^^2^2^2940906^
;;^DD(.403,14,21,1,0)
;;=This is MUMPS code that is executed when the user saves changes. It is
;;^DD(.403,14,21,2,0)
;;=executed only if all data is valid, and after all data has been filed.
;;^DD(.403,14,"DT")
;;=2930813
;;^DD(.403,15,0)
;;=DESCRIPTION^.40315^^15;0
;;^DD(.403,20,0)
;;=DATA VALIDATION^K^^20;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
;;^DD(.403,20,3)
;;=Enter standard MUMPS code.
;;^DD(.403,20,9)
;;=@
;;^DD(.403,20,21,0)
;;=^^8^8^2940906^
;;^DD(.403,20,21,1,0)
;;=This is MUMPS code that is executed when the user attempts to save changes
;;^DD(.403,20,21,2,0)
;;=to the form. If the code sets DDSERROR, the user is unable to save
;;^DD(.403,20,21,3,0)
;;=changes. If the code sets DDSBR, the user is taken to the specified
;;^DD(.403,20,21,4,0)
;;=field.
;;^DD(.403,20,21,5,0)
;;=
;;^DD(.403,20,21,6,0)
;;=In addition to $$GET^DDSVAL, PUT^DDSVAL, and HLP^DDSUTL, you
;;^DD(.403,20,21,7,0)
;;=can use MSG^DDSUTL to print on a separate screen messages to the user
;;^DD(.403,20,21,8,0)
;;=about the validity of the data.
;;^DD(.403,21,0)
;;=RECORD SELECTION PAGE^NJ5,1^^21;1^K:+X'=X!(X>999.9)!(X<1)!(X?.E1"."2N.N) X
;;^DD(.403,21,3)
;;=Type a Number between 1 and 999.9, 1 Decimal Digit
;;^DD(.403,21,21,0)
;;=^^12^12^2940906^
;;^DD(.403,21,21,1,0)
;;=Enter the page number of the page that is used for record selection.
;;^DD(.403,21,21,2,0)
;;=
;;^DD(.403,21,21,3,0)
;;=If you define a Record Selection Page, the user can select another entry
;;^DD(.403,21,21,4,0)
;;=in the file, and, if LAYGO is allowed, add another entry into the file
;;^DD(.403,21,21,5,0)
;;=without exiting the form. The Record Selection Page should be a pop-up
;;^DD(.403,21,21,6,0)
;;=page that contains one form-only field that performs a pointer-type read
;;^DD(.403,21,21,7,0)
;;=into the Primary File of the form. The Record Selection Page property
;;^DD(.403,21,21,8,0)
;;=should be set equal to the Page Number of the Record Selection Page.
;;^DD(.403,21,21,9,0)
;;=
;;^DD(.403,21,21,10,0)
;;=The user can open the Record Selection Page by pressing <PF1>L. After the
;;^DD(.403,21,21,11,0)
;;=user selects a record and closes the Record Selection Page, the data for
;;^DD(.403,21,21,12,0)
;;=the selected record is displayed.
;;^DD(.403,40,0)
;;=PAGE^.4031I^^40;0
;;^DD(.403,21400,0)
;;=BUILD(S)^Cmp9.6^^ ; ^N DISNAME,D S DISNAME=$P($G(^DIST(.403,D0,0)),U)_" FILE #"_$P($G(^(0)),U,8) F D=0:0 S D=$O(^XPD(9.6,D)) Q:'D I $D(^(D,"KRN",.403,"NM","B",DISNAME)) N D0 S D0=D,X=$P(^XPD(9.6,D,0),U) X DICMX Q:'$D(D)
;;^DD(.403,21400,21,0)
;;=^^3^3^3160105^^
;;^DD(.403,21400,21,1,0)
;;=The Build File (#9.6) is searched for Builds containing the ScreenMan Form.
;;^DD(.403,21400,21,2,0)
;;=A list of the identified Builds is created for display.
;;^DD(.403,21400,21,3,0)
;;=Multiple Builds will be shown if appropriate.
;;^DD(.4031,0)
;;=PAGE SUB-FIELD^^40^13
;;^DD(.4031,0,"DT")
;;=2940506
;;^DD(.4031,0,"ID","WRITE")
;;=D:$D(^(1))#2 EN^DDIOL($P(^(1),U),"","?12")
;;^DD(.4031,0,"IX","AC",.4031,5)
;;=
;;^DD(.4031,0,"IX","B",.4031,.01)
;;=
;;^DD(.4031,0,"IX","C",.4031,7)
;;=
;;^DD(.4031,0,"NM","PAGE")
;;=
;;^DD(.4031,0,"UP")
;;=.403
;;^DD(.4031,.01,0)
;;=PAGE NUMBER^MNJ5,1X^^0;1^K:+X'=X!(X>999.9)!(X<1)!(X?.E1"."2N.N)!$D(^DIST(.403,DA(1),40,"B",X)) X
;;^DD(.4031,.01,1,0)
;;=^.1
;;^DD(.4031,.01,1,1,0)
;;=.4031^B
;;^DD(.4031,.01,1,1,1)
;;=S ^DIST(.403,DA(1),40,"B",$E(X,1,30),DA)=""
;;^DD(.4031,.01,1,1,2)
;;=K ^DIST(.403,DA(1),40,"B",$E(X,1,30),DA)
;;^DD(.4031,.01,3)
;;=Enter a number between 1 and 999.9, up to 1 Decimal Digit, that identifies the page.
;;^DD(.4031,.01,21,0)
;;=^^2^2^2940907^^^
;;^DD(.4031,.01,21,1,0)
;;=This is the unique page number of the page. You can use this number to
;;^DD(.4031,.01,21,2,0)
;;=refer to the page in ScreenMan functions and utilities.
;;^DD(.4031,1,0)
;;=HEADER BLOCK^P.404^DIST(.404,^0;2^Q
;;^DD(.4031,1,1,0)
;;=^.1
;;^DD(.4031,1,1,1,0)
;;=.403^AC
;;^DD(.4031,1,1,1,1)
;;=S ^DIST(.403,"AC",$E(X,1,30),DA(1),DA)=""
;;^DD(.4031,1,1,1,2)
;;=K ^DIST(.403,"AC",$E(X,1,30),DA(1),DA)
;;^DD(.4031,1,1,1,"DT")
;;=2930702
;;^DD(.4031,1,3)
;;=Enter the block which will be used as a header for this page.
;;^DD(.4031,1,21,0)
;;=^^7^7^2940907^^^
;;^DD(.4031,1,21,1,0)
;;=The header block always appears at row 1, column 1 relative to the page
;;^DD(.4031,1,21,2,0)
;;=on which it is defined. It is for display purposes only -- the user
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDINIT291 7779 printed Nov 22, 2024@18:01:11 Page 2
DINIT291 ;SFISC/MKO-FORM AND BLOCK FILES ;08DEC2015
+1 ;;22.2;VA FileMan;;Jan 05, 2016;Build 42
+2 ;;Per VA Directive 6402, this routine should not be modified.
+3 ;;Submitted to OSEHRA 5 January 2015 by the VISTA Expertise Network.
+4 ;;Based on Medsphere Systems Corporation's MSC FileMan 1051.
+5 ;;Licensed under the terms of the Apache License, Version 2.0.
+6 ;
+7 FOR I=1:2
SET X=$TEXT(Q+I)
if X=""
QUIT
SET Y=$EXTRACT($TEXT(Q+I+1),4,999)
SET X=$EXTRACT(X,4,999)
if $ASCII(Y)=126
SET I=I+1
SET Y=$EXTRACT(Y,2,999)_$EXTRACT($TEXT(Q+I+1),5,99)
if $ASCII(Y)=61
SET Y=$EXTRACT(Y,2,999)
SET @X=Y
+8 GOTO ^DINIT292
Q QUIT
+1 ;;^DD(.403,7,1,1,3)
+2 ;;=Programmer only
+3 ;;^DD(.403,7,1,1,"%D",0)
+4 ;;=^^2^2^2900911^
+5 ;;^DD(.403,7,1,1,"%D",0,"LE")
+6 ;;=1
+7 ;;^DD(.403,7,1,1,"%D",1,0)
+8 ;;=This cross-reference is used to quickly find all ScreenMan templates
+9 ;;^DD(.403,7,1,1,"%D",2,0)
+10 ;;=associated with a file.
+11 ;;^DD(.403,7,1,1,"DT")
+12 ;;=2900911
+13 ;;^DD(.403,7,3)
+14 ;;=Answer must be 1-16 characters in length.
+15 ;;^DD(.403,7,21,0)
+16 ;;=^^2^2^2920407^
+17 ;;^DD(.403,7,21,1,0)
+18 ;;=Enter a file number, greater than or equal to 2, which represents the data
+19 ;;^DD(.403,7,21,2,0)
+20 ;;=dictionary number of the primary file for this form.
+21 ;;^DD(.403,7,"DT")
+22 ;;=2920407
+23 ;;^DD(.403,8,0)
+24 ;;=DISPLAY ONLY^SI^0:NO;1:YES;^0;9^Q
+25 ;;^DD(.403,8,21,0)
+26 ;;=^^2^2^2931027^^^^
+27 ;;^DD(.403,8,21,1,0)
+28 ;;=This is a flag that indicates none of the blocks on the form are edit
+29 ;;^DD(.403,8,21,2,0)
+30 ;;=blocks. This flag is set during form compilation.
+31 ;;^DD(.403,8,"DT")
+32 ;;=2931028
+33 ;;^DD(.403,9,0)
+34 ;;=FORM ONLY^SI^0:NO;1:YES;^0;10^Q
+35 ;;^DD(.403,9,21,0)
+36 ;;=^^2^2^2931027^
+37 ;;^DD(.403,9,21,1,0)
+38 ;;=This is a flag that indicates none of the fields on the form are data
+39 ;;^DD(.403,9,21,2,0)
+40 ;;=dictionary fields. This flag is set during form compilation.
+41 ;;^DD(.403,9,"DT")
+42 ;;=2931028
+43 ;;^DD(.403,10,0)
+44 ;;=COMPILED^SI^0:NO;1:YES;^0;11^Q
+45 ;;^DD(.403,10,1,0)
+46 ;;=^.1^^0
+47 ;;^DD(.403,10,21,0)
+48 ;;=^^2^2^2940908^
+49 ;;^DD(.403,10,21,1,0)
+50 ;;=This is a flag that indicates that the form is compiled. This flag is
+51 ;;^DD(.403,10,21,2,0)
+52 ;;=set during form compilation.
+53 ;;^DD(.403,10,"DT")
+54 ;;=2940701
+55 ;;^DD(.403,11,0)
+56 ;;=PRE ACTION^K^^11;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
+57 ;;^DD(.403,11,3)
+58 ;;=Enter standard MUMPS code which will be executed at the beginning of the form.
+59 ;;^DD(.403,11,9)
+60 ;;=@
+61 ;;^DD(.403,11,21,0)
+62 ;;=^^2^2^2940906^
+63 ;;^DD(.403,11,21,1,0)
+64 ;;=This is MUMPS code that is executed when the form is first invoked,
+65 ;;^DD(.403,11,21,2,0)
+66 ;;=before any of the pages are loaded and displayed.
+67 ;;^DD(.403,12,0)
+68 ;;=POST ACTION^K^^12;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
+69 ;;^DD(.403,12,3)
+70 ;;=Enter standard MUMPS code which will be executed at the end of the form.
+71 ;;^DD(.403,12,9)
+72 ;;=@
+73 ;;^DD(.403,12,21,0)
+74 ;;=^^2^2^2940906^^
+75 ;;^DD(.403,12,21,1,0)
+76 ;;=This is MUMPS code that is executed before ScreenMan returns to the
+77 ;;^DD(.403,12,21,2,0)
+78 ;;=calling application.
+79 ;;^DD(.403,14,0)
+80 ;;=POST SAVE^K^^14;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
+81 ;;^DD(.403,14,3)
+82 ;;=This is Standard MUMPS code.
+83 ;;^DD(.403,14,9)
+84 ;;=@
+85 ;;^DD(.403,14,21,0)
+86 ;;=^^2^2^2940906^
+87 ;;^DD(.403,14,21,1,0)
+88 ;;=This is MUMPS code that is executed when the user saves changes. It is
+89 ;;^DD(.403,14,21,2,0)
+90 ;;=executed only if all data is valid, and after all data has been filed.
+91 ;;^DD(.403,14,"DT")
+92 ;;=2930813
+93 ;;^DD(.403,15,0)
+94 ;;=DESCRIPTION^.40315^^15;0
+95 ;;^DD(.403,20,0)
+96 ;;=DATA VALIDATION^K^^20;E1,245^K:$L(X)>245 X D:$D(X) ^DIM
+97 ;;^DD(.403,20,3)
+98 ;;=Enter standard MUMPS code.
+99 ;;^DD(.403,20,9)
+100 ;;=@
+101 ;;^DD(.403,20,21,0)
+102 ;;=^^8^8^2940906^
+103 ;;^DD(.403,20,21,1,0)
+104 ;;=This is MUMPS code that is executed when the user attempts to save changes
+105 ;;^DD(.403,20,21,2,0)
+106 ;;=to the form. If the code sets DDSERROR, the user is unable to save
+107 ;;^DD(.403,20,21,3,0)
+108 ;;=changes. If the code sets DDSBR, the user is taken to the specified
+109 ;;^DD(.403,20,21,4,0)
+110 ;;=field.
+111 ;;^DD(.403,20,21,5,0)
+112 ;;=
+113 ;;^DD(.403,20,21,6,0)
+114 ;;=In addition to $$GET^DDSVAL, PUT^DDSVAL, and HLP^DDSUTL, you
+115 ;;^DD(.403,20,21,7,0)
+116 ;;=can use MSG^DDSUTL to print on a separate screen messages to the user
+117 ;;^DD(.403,20,21,8,0)
+118 ;;=about the validity of the data.
+119 ;;^DD(.403,21,0)
+120 ;;=RECORD SELECTION PAGE^NJ5,1^^21;1^K:+X'=X!(X>999.9)!(X<1)!(X?.E1"."2N.N) X
+121 ;;^DD(.403,21,3)
+122 ;;=Type a Number between 1 and 999.9, 1 Decimal Digit
+123 ;;^DD(.403,21,21,0)
+124 ;;=^^12^12^2940906^
+125 ;;^DD(.403,21,21,1,0)
+126 ;;=Enter the page number of the page that is used for record selection.
+127 ;;^DD(.403,21,21,2,0)
+128 ;;=
+129 ;;^DD(.403,21,21,3,0)
+130 ;;=If you define a Record Selection Page, the user can select another entry
+131 ;;^DD(.403,21,21,4,0)
+132 ;;=in the file, and, if LAYGO is allowed, add another entry into the file
+133 ;;^DD(.403,21,21,5,0)
+134 ;;=without exiting the form. The Record Selection Page should be a pop-up
+135 ;;^DD(.403,21,21,6,0)
+136 ;;=page that contains one form-only field that performs a pointer-type read
+137 ;;^DD(.403,21,21,7,0)
+138 ;;=into the Primary File of the form. The Record Selection Page property
+139 ;;^DD(.403,21,21,8,0)
+140 ;;=should be set equal to the Page Number of the Record Selection Page.
+141 ;;^DD(.403,21,21,9,0)
+142 ;;=
+143 ;;^DD(.403,21,21,10,0)
+144 ;;=The user can open the Record Selection Page by pressing <PF1>L. After the
+145 ;;^DD(.403,21,21,11,0)
+146 ;;=user selects a record and closes the Record Selection Page, the data for
+147 ;;^DD(.403,21,21,12,0)
+148 ;;=the selected record is displayed.
+149 ;;^DD(.403,40,0)
+150 ;;=PAGE^.4031I^^40;0
+151 ;;^DD(.403,21400,0)
+152 ;;=BUILD(S)^Cmp9.6^^ ; ^N DISNAME,D S DISNAME=$P($G(^DIST(.403,D0,0)),U)_" FILE #"_$P($G(^(0)),U,8) F D=0:0 S D=$O(^XPD(9.6,D)) Q:'D I $D(^(D,"KRN",.403,"NM","B",DISNAME)) N D0 S D0=D,X=$P(^XPD(9.6,D,0),U) X DICMX Q:'$D(D)
+153 ;;^DD(.403,21400,21,0)
+154 ;;=^^3^3^3160105^^
+155 ;;^DD(.403,21400,21,1,0)
+156 ;;=The Build File (#9.6) is searched for Builds containing the ScreenMan Form.
+157 ;;^DD(.403,21400,21,2,0)
+158 ;;=A list of the identified Builds is created for display.
+159 ;;^DD(.403,21400,21,3,0)
+160 ;;=Multiple Builds will be shown if appropriate.
+161 ;;^DD(.4031,0)
+162 ;;=PAGE SUB-FIELD^^40^13
+163 ;;^DD(.4031,0,"DT")
+164 ;;=2940506
+165 ;;^DD(.4031,0,"ID","WRITE")
+166 ;;=D:$D(^(1))#2 EN^DDIOL($P(^(1),U),"","?12")
+167 ;;^DD(.4031,0,"IX","AC",.4031,5)
+168 ;;=
+169 ;;^DD(.4031,0,"IX","B",.4031,.01)
+170 ;;=
+171 ;;^DD(.4031,0,"IX","C",.4031,7)
+172 ;;=
+173 ;;^DD(.4031,0,"NM","PAGE")
+174 ;;=
+175 ;;^DD(.4031,0,"UP")
+176 ;;=.403
+177 ;;^DD(.4031,.01,0)
+178 ;;=PAGE NUMBER^MNJ5,1X^^0;1^K:+X'=X!(X>999.9)!(X<1)!(X?.E1"."2N.N)!$D(^DIST(.403,DA(1),40,"B",X)) X
+179 ;;^DD(.4031,.01,1,0)
+180 ;;=^.1
+181 ;;^DD(.4031,.01,1,1,0)
+182 ;;=.4031^B
+183 ;;^DD(.4031,.01,1,1,1)
+184 ;;=S ^DIST(.403,DA(1),40,"B",$E(X,1,30),DA)=""
+185 ;;^DD(.4031,.01,1,1,2)
+186 ;;=K ^DIST(.403,DA(1),40,"B",$E(X,1,30),DA)
+187 ;;^DD(.4031,.01,3)
+188 ;;=Enter a number between 1 and 999.9, up to 1 Decimal Digit, that identifies the page.
+189 ;;^DD(.4031,.01,21,0)
+190 ;;=^^2^2^2940907^^^
+191 ;;^DD(.4031,.01,21,1,0)
+192 ;;=This is the unique page number of the page. You can use this number to
+193 ;;^DD(.4031,.01,21,2,0)
+194 ;;=refer to the page in ScreenMan functions and utilities.
+195 ;;^DD(.4031,1,0)
+196 ;;=HEADER BLOCK^P.404^DIST(.404,^0;2^Q
+197 ;;^DD(.4031,1,1,0)
+198 ;;=^.1
+199 ;;^DD(.4031,1,1,1,0)
+200 ;;=.403^AC
+201 ;;^DD(.4031,1,1,1,1)
+202 ;;=S ^DIST(.403,"AC",$E(X,1,30),DA(1),DA)=""
+203 ;;^DD(.4031,1,1,1,2)
+204 ;;=K ^DIST(.403,"AC",$E(X,1,30),DA(1),DA)
+205 ;;^DD(.4031,1,1,1,"DT")
+206 ;;=2930702
+207 ;;^DD(.4031,1,3)
+208 ;;=Enter the block which will be used as a header for this page.
+209 ;;^DD(.4031,1,21,0)
+210 ;;=^^7^7^2940907^^^
+211 ;;^DD(.4031,1,21,1,0)
+212 ;;=The header block always appears at row 1, column 1 relative to the page
+213 ;;^DD(.4031,1,21,2,0)
+214 ;;=on which it is defined. It is for display purposes only -- the user