source: WorldVistAEHR/trunk/r/IMAGING-MAG-ZMAG/MAGUSIT.m@ 1036

Last change on this file since 1036 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.9 KB
Line 
1MAGUSIT ;WOIFO/SRR/RMP - IMAGE SITE PARAMETERS COMPANION [ 06/29/2001 18:28 ]
2 ;;3.0;IMAGING;**3,8,20**;Apr 12, 2006
3 ;; +---------------------------------------------------------------+
4 ;; | Property of the US Government. |
5 ;; | No permission to copy or redistribute this software is given. |
6 ;; | Use of unreleased versions of this software requires the user |
7 ;; | to execute a written test agreement with the VistA Imaging |
8 ;; | Development Office of the Department of Veterans Affairs, |
9 ;; | telephone (301) 734-0100. |
10 ;; | |
11 ;; | The Food and Drug Administration classifies this software as |
12 ;; | a medical device. As such, it may not be changed in any way. |
13 ;; | Modifications to this software may result in an adulterated |
14 ;; | medical device under 21CFR820, the use of which is considered |
15 ;; | to be a violation of US Federal Statutes. |
16 ;; +---------------------------------------------------------------+
17 ;;
18INI ;
19 N NAME,D0,MAGDA,CNMSP,PLACE
20 S PLACE=$$PLACE^MAGBAPI(+$G(DUZ(2)))
21 I $D(^MAG(2006.1,PLACE,0)),$L($P(^(0),U,2))=3 Q
22 S NAME=$$KSP^XUPARAM("WHERE")
23 I NAME[".MED" S NAME=$P(NAME,".MED",1)_$P(NAME,".MED",2)
24 S MAGDA=$O(^MAG(2006.19,"B",NAME,""))
25 S FN=$S('MAGDA:$$UNDEF(NAME),1:$P($G(^MAG(2006.19,MAGDA,0)),U,4))
26 I FN="" D LNOIS Q
27 D PNMSP(PLACE,FN)
28 Q
29PNMSP(PLACE,FN) ;
30 S CNMSP=$P(^MAG(2006.1,PLACE,0),U,2)
31 I $L(CNMSP)>0 D ;UPDATE MULTI NAMESPACE
32 . K DIE,DINUM,FDA,DIERR
33 . S FDA(2006.11,"+1,"_PLACE_",",.01)=CNMSP
34 . D UPDATE^DIE("U","FDA")
35 . K FDA Q
36 I $D(DIERR) D LNOIS Q
37 D BMES^XPDUTL("Imaging SITE is: "_NAME_" Namespace: "_FN)
38 K FDA,DIE,DINUM,DIERR
39 S FDA(2006.1,PLACE_",",.02)=FN
40 D UPDATE^DIE("U","FDA")
41 K FDA
42 I $D(DIERR) D LNOIS
43 Q
44LNOIS ;
45 D BMES^XPDUTL(" Contact the National Help desk to update a namespace!") Q
46UNDEF(NAME) ;The domain is undefined in the Image site file (2006.19)
47 N ASK,Y,FN
48 S DIR("A")="Enter the type of account"
49 S DIR("?")="Enter either T for a test account or P for a production account",DIR("B")="T"
50 S DIR(0)="S0^T:Test;P:PRODUCTION"
51 D ^DIR S ASK=Y
52 K DIR
53 I ASK="T" S FN="ZZT"
54 I ASK="P" D
55 . S FN=$$ONE^MAGQAI(NAME)
56 . D UI(NAME,FN) ;MAIL MESSAGE TO LAVC-SERVER/IMAGE DEVELOPERS
57 Q FN
58EXIT ;EXIT
59 K DIC,DIE,DA,DR,MAM,NET,WORK
60 Q
61UI(DOMAIN,INIT) ;UPDATE IMAGING DISTRIBUTION
62 N Y,LOC
63 D NOW^%DTC S Y=% D DD^%DT
64 S LOC=$$KSP^XUPARAM("WHERE")
65 S ^TMP($J,"MAGQ",1)=" SITE: "_LOC
66 S ^TMP($J,"MAGQ",2)=" DATE: "_Y_" "_$G(^XMB("TIMEZONE"))
67 S ^TMP($J,"MAGQ",3)=" DOMAIN: "_DOMAIN
68 S ^TMP($J,"MAGQ",4)=" INITIALS: "_INIT
69 D MAILIT
70 K ^TMP($J,"MAGQ")
71 Q
72MAILIT ;Send the report to the Clinical Application Time
73 N XMSUB
74 S XMSUB="Update Site file from "_LOC
75MAILSHR ;Shared Mail server code
76 ;If droping in...must manage XMSUB
77 N XMY,XMTEXT,D,D0,D1,D2,DG,DIC,DICR,DIW,INDX
78 S XMTEXT="^TMP($J,""MAGQ"")"
79 I $G(DUZ) S XMY(DUZ)="",XMDUZ=DUZ
80 E S XMY(.5)="",XMDUZ=.5
81 S XMY("G.MAG SERVER")=""
82 S:$G(MAGDUZ) XMY(MAGDUZ)=""
83 S XMSUBJ=XMSUB
84 S XMBODY=XMTEXT
85 S INDX=""
86 F S INDX=$O(XMY(INDX)) Q:INDX="" S XMTO(INDX)=""
87 D SENDMSG^XMXAPI(XMDUZ,XMSUBJ,XMBODY,.XMTO,,.XMZ,)
88 K XMBODY,XMSUBJ,XMTO,XMZ
89 Q
90ISN(RESULT,FILENAME,NETSIZE,JBSIZE) ; Image File Size variance Notice
91 N Y,LOC,XMSUB,DIS,CAP,CNT,I,VR,DM,INST
92 K ^TMP($J,"MAGQ")
93 D NOW^%DTC S Y=% D DD^%DT
94 S INST=$S($$CONSOLID^MAGBAPI():$$GET1^DIQ(2006.1,$$PLACE^MAGBAPI(+$G(DUZ(2))),.01),1:$$KSP^XUPARAM("INST"))
95 S XMSUB="Image File Size Variance: "_$$GET1^DIQ(4,INST,.01)
96 S ^TMP($J,"MAGQ",1)=" SITE: "_$$GET1^DIQ(4,INST,.01)_"^"_INST
97 S ^TMP($J,"MAGQ",2)=" DATE: "_Y_" "_$G(^XMB("TIMEZONE"))
98 S ^TMP($J,"MAGQ",3)=" DOMAIN: "_$$KSP^XUPARAM("WHERE")
99 S ^TMP($J,"MAGQ",4)=" Filename: "_FILENAME
100 S ^TMP($J,"MAGQ",5)="Vista Cache Size: "_NETSIZE
101 S ^TMP($J,"MAGQ",6)=" Jukebox Size: "_JBSIZE
102 D MAILSHR
103 S RESULT="1"
104 K ^TMP($J,"MAGQ")
105 Q
106 ;
Note: See TracBrowser for help on using the repository browser.