Changeset 636 for FOIAVistA/tag/r/CLINICAL_REMINDERS-PXRM/PXRMEXSI.m
- Timestamp:
- Dec 4, 2009, 8:26:01 PM (14 years ago)
- Location:
- FOIAVistA/tag/r
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
FOIAVistA/tag/r/CLINICAL_REMINDERS-PXRM/PXRMEXSI.m
r628 r636 1 PXRMEXSI ; SLC/PKR/PJH - Silent repository entry install. ;09/28/2007 2 ;;2.0;CLINICAL REMINDERS;**6**;Feb 04, 2005;Build 123 1 PXRMEXSI ; SLC/PKR/PJH - Silent repository entry install. ;12/22/2004 2 ;;2.0;CLINICAL REMINDERS;;Feb 04, 2005 3 ; 4 ;=================================================== 5 BUILD ;Build list manager workfile from ^TMP("PXRMEXTMP" (see ^PXRMEXLB) 6 N DDATA,DDLG,IND,JND,NLINE,NSEL 7 S NLINE=0,NSEL=0 8 S DDLG=$G(^TMP("PXRMEXTMP",$J,"PXRMDNAM")) Q:DDLG="" 9 ; 10 ;Save reminder dialog 11 S DDATA=^TMP("PXRMEXTMP",$J,"DLOC",DDLG) 12 S IND=$P(DDATA,U,3),JND=$P(DDATA,U,4) 13 D DSAVE(DDLG,IND,JND) 14 ; 15 ;Process sub-components 16 I $D(^TMP("PXRMEXTMP",$J,"DREPL",DDLG))>0 D DREPL(DDLG) 17 D DCMP(DDLG) 18 Q 19 ; 20 ;=================================================== 21 DCMP(DLG) ;Search for dialog components 22 N DDLG,DEND,DNAM,DSEQ,DSTRT,IND,JND 23 S DSEQ=0 24 F S DSEQ=$O(^TMP("PXRMEXTMP",$J,"DMAP",DLG,DSEQ)) Q:'DSEQ D 25 . S DDATA=^TMP("PXRMEXTMP",$J,"DMAP",DLG,DSEQ) 26 . S DNAM=$P(DDATA,U),DSTRT=$P(DDATA,U,2),DEND=$P(DDATA,U,3) Q:DNAM="" 27 . S IND=$P(DDATA,U,4),JND=$P(DDATA,U,5) 28 .;Save line in workfile 29 . D DSAVE(DNAM,IND,JND) 30 .; 31 . I $D(^TMP("PXRMEXTMP",$J,"DREPL",DNAM))>0 D DREPL(DNAM) 32 .;Process any sub-components 33 . I $D(^TMP("PXRMEXTMP",$J,"DMAP",DNAM)) D DCMP(DNAM) 34 Q 35 ; 36 ;=================================================== 37 DREPL(DLG,LEV) ; 38 N DDATA,DDLG,DEND,DNAM,DSEQ,DSTRT,IND,JND 39 S DDATA=^TMP("PXRMEXTMP",$J,"DREPL",DLG) 40 S DNAM=$P(DDATA,U),DSTRT=$P(DDATA,U,2),DEND=$P(DDATA,U,3) Q:DNAM="" 41 S IND=$P(DDATA,U,4),JND=$P(DDATA,U,5) 42 ;Save line in workfile 43 D DSAVE(DNAM,IND,JND) 44 I $D(^TMP("PXRMEXTMP",$J,"DMAP",DNAM)) D DCMP(DNAM) 45 Q 46 ;=================================================== 47 DSAVE(DNAM,IND,JND) ;Update workfile 48 ;Ignore national prompts 49 I $$PXRM^PXRMEXID(DNAM) Q 50 N DEXIST 51 S NSEL=NSEL+1 52 ;Check if dialog exists 53 S DEXIST=$$EXISTS^PXRMEXIU(801.41,DNAM) 54 ;Store the file number, start and stop line in the exchange file. 55 S ^TMP("PXRMEXLD",$J,"SEL",NSEL)=FILENUM_U_IND_U_JND_U_DEXIST 56 Q 3 57 ; 4 58 ;=================================================== 5 59 INITMPG ;Initialize ^TMP arrays. 6 K ^TMP("PXRMEXFND",$J)7 60 K ^TMP("PXRMEXIA",$J) 8 K ^TMP("PXRMEXIAD",$J)9 61 K ^TMP("PXRMEXLC",$J) 10 62 K ^TMP("PXRMEXLD",$J) … … 13 65 ; 14 66 ;=================================================== 15 INSCOM(PXRMRIEN,ACTION,IND,TEMP,REMNAME,HISTSUB) ;Install component IND 16 ;of PXRMRIEN. 17 N ATTR,END,EXISTS,FILENUM,IND120,JND120,NAME 18 N PT01,RTN,SAME,START,TEXT 67 INSCOM(PXRMRIEN,IND,TEMP,REMNAME) ;Install component IND of PXRMRIEN. 68 N ACTION,ATTR,END,EXISTS,FILENUM,IND120,JND120,NAME 69 N PT01,RTN,START 19 70 S FILENUM=$P(TEMP,U,1),EXISTS=$P(TEMP,U,4) 20 71 S IND120=$P(TEMP,U,2),JND120=$P(TEMP,U,3) 21 I (IND120="")!(JND120="") Q22 72 S TEMP=^PXD(811.8,PXRMRIEN,120,IND120,1,JND120,0) 23 ;If the component does not exist then the action has to be "I". 24 ;If the component exists and the action is "I" change it to "O". 25 ;If the component exists and the action is "M" leave it "M". 26 ;If the component exists and the action is "O" leave it "O". 27 S ACTION=$S('EXISTS:"I",ACTION="I":"O",1:ACTION) 28 S SAME=0 73 I (FILENUM=801.41)!(FILENUM=811.5) S ACTION=$S(EXISTS:"M",1:"I") 74 E S ACTION=$S(EXISTS:"O",1:"I") 29 75 S START=$P(TEMP,U,2) 30 76 S END=$P(TEMP,U,3) 77 S TEMP=^PXD(811.8,PXRMRIEN,100,START,0) 31 78 I FILENUM=0 D 32 79 . D RTNLD^PXRMEXIC(PXRMRIEN,START,END,.ATTR,.RTN) 33 . I EXISTS D 34 .. D CHECKSUM^PXRMEXCS(.ATTR,START,END) 35 .. S CSUM=$$RTNCS^PXRMEXCS(ATTR("NAME")) 36 .. I ATTR("CHECKSUM")=CSUM S SAME=1,ACTION="S" 80 .;Save what was done for the installation summary. 37 81 . S ^TMP("PXRMEXIA",$J,IND,"ROUTINE",ATTR("NAME"),ACTION)="" 38 82 E D 39 . S TEMP=^PXD(811.8,PXRMRIEN,100,START,0)40 83 . S PT01=$P(TEMP,"~",2) 41 .;Save reminder name for dialog install. 42 . I FILENUM=811.9 S REMNAME=PT01 43 . D SETATTR^PXRMEXFI(.ATTR,FILENUM,PT01) 44 . I EXISTS D 45 .. D CHECKSUM^PXRMEXCS(.ATTR,START,END) 46 .. S CSUM=$$FILE^PXRMEXCS(ATTR("FILE NUMBER"),EXISTS) 47 .. I ATTR("CHECKSUM")=CSUM S SAME=1,ACTION="S" 84 . S (ATTR("NAME"),ATTR("PT01"))=PT01 85 . D SETATTR^PXRMEXFI(.ATTR,FILENUM) 48 86 .;Save what was done for the installation summary. 49 . S ^TMP(HISTSUB,$J,IND,ATTR("FILE NAME"),PT01,ACTION)="" 50 ;If the packed component and the installed component are the same 51 ;there is nothing to do. 52 I SAME Q 87 . S ^TMP("PXRMEXIA",$J,IND,ATTR("FILE NAME"),PT01,ACTION)="" 53 88 ;Install this component. 54 89 I FILENUM=0 D RTNSAVE^PXRMEXIC(.RTN,ATTR("NAME")) 55 90 E D FILE^PXRMEXIC(PXRMRIEN,EXISTS,IND120,JND120,ACTION,.ATTR,.PXRMNMCH) 91 ;Save reminder name 92 I FILENUM=811.9 S REMNAME=PT01 93 ;If this component was not installed add to the no install message. 56 94 Q 57 95 ; 58 96 ;=================================================== 59 INSDLG(PXRMRIEN,ACTION) ;Install dialog components directly 60 ;from the "SEL" array. 61 N IND,FILENUM,ITEMP,NAME,REMNAME,TEMP 62 ;Build the selection array in ^TMP("PXRMEXLD",$J,"SEL"). For dialogs 63 ;the selection array is: 64 ;file no.^FDA start^FDA end^EXISTS^IND120^JND120^NAME 65 D BLDDISP^PXRMEXD1(0) 66 ;Work through the selection array installing the dialog parts 67 ;in reverse order. 68 S IND="" 69 F S IND=$O(^TMP("PXRMEXLD",$J,"SEL",IND),-1) Q:(IND="")!(PXRMDONE) D 70 . S TEMP=^TMP("PXRMEXLD",$J,"SEL",IND) 71 . S FILENUM=$P(TEMP,U,1),NAME=$P(TEMP,U,7) 72 .;Dialog elements may be used more than once in a dialog so make sure 73 .;the element has not already been installed. 74 . S ITEMP=$P(TEMP,U,1)_U_$P(TEMP,U,5,6)_U_$$EXISTS^PXRMEXIU(FILENUM,NAME) 75 . D INSCOM(PXRMRIEN,ACTION,IND,ITEMP,.REMNAME,"PXRMEXIAD") 97 INSDLG(PXRMRIEN) ;Install dialog components (in reverse order) 98 ; 99 K ^TMP("PXRMEXSI",$J) 100 N IND,TEMP,JND120,KIDSDONE 101 ;Build list of components 102 D BUILD 103 S IND="",KIDSDONE=0 104 F S IND=$O(^TMP("PXRMEXLD",$J,"SEL",IND),-1) Q:'IND!(KIDSDONE=1) D 105 . S TEMP=^TMP("PXRMEXLD",$J,"SEL",IND),JND120=$P(TEMP,U,3) 106 .;Skip install if dialog occurs more than once 107 . I $D(^TMP("PXRMEXSI",$J,JND120)) Q 108 . S ^TMP("PXRMEXSI",$J,JND120)="" 109 .;Silent Dialog Install 110 . D INSCOM(PXRMRIEN,IND,TEMP,.REMNAME) 111 K ^TMP("PXRMEXSI",$J) 76 112 Q 77 113 ; 78 114 ;=================================================== 79 INSTALL(PXRMRIEN, ACTION,NOR) ;Install all components in a repository entry.115 INSTALL(PXRMRIEN,NOR) ;Install all components in a repository entry. 80 116 ;If NOR is true do not install routines. 81 N DNAME,FILENUM,IND,PXRMDONE,PXRMNMCH,REMNAME,TEMP 82 S PXRMDONE=0 117 N DNAME,FILENUM,IND,PXRMNMCH,REMNAME,TEMP 83 118 S NOR=$G(NOR) 84 119 ;Initialize ^TMP globals. … … 91 126 ;Build the selectable list. 92 127 D CDISP^PXRMEXLC(PXRMRIEN) 93 ;Set the install date and time and type.128 ;Set the install date and time. 94 129 S ^TMP("PXRMEXIA",$J,"DT")=$$NOW^XLFDT 95 S ^TMP("PXRMEXIA",$J,"TYPE")="SILENT"96 130 ;Initialize the name change storage. 97 131 K PXRMNMCH 98 132 S IND=0 99 F S IND=$O(^TMP("PXRMEXLC",$J,"SEL",IND)) Q: (IND="")!(PXRMDONE)D133 F S IND=$O(^TMP("PXRMEXLC",$J,"SEL",IND)) Q:+IND=0 D 100 134 . S TEMP=^TMP("PXRMEXLC",$J,"SEL",IND) 101 135 . S FILENUM=$P(TEMP,U,1) … … 103 137 . I FILENUM=0,NOR Q 104 138 . ;Install dialog components 105 . I FILENUM=801.41 N PXRMDONE S PXRMDONE=0 D INSDLG(PXRMRIEN ,ACTION) Q139 . I FILENUM=801.41 N PXRMDONE S PXRMDONE=0 D INSDLG(PXRMRIEN) Q 106 140 . ;Install component 107 . E D INSCOM(PXRMRIEN, ACTION,IND,TEMP,.REMNAME,"PXRMEXIA")141 . E D INSCOM(PXRMRIEN,IND,TEMP,.REMNAME) 108 142 ; 109 143 ;Get the dialog name
Note:
See TracChangeset
for help on using the changeset viewer.