source: WorldVistAEHR/trunk/r/VISTA_OFFICE_EHR-VEPE/VEPERVER.m@ 1356

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

initial load of WorldVistAEHR

File size: 2.1 KB
Line 
1VEPERVER ;CJS/QRI ;11/5/07 15:40
2 ; VOE Version display, 1.0.0;;;;;Build 2
3 ;
4DISP ;
5 N ANS,OS,ROOT,FILENAME,SAVEDUZ,DECRYPT,ERROR
6 S SAVEDUZ=DUZ,DUZ=.5 K ^TMP($J)
7 S ^TMP($J,1,0)=" WorldVistA EHR /VOE 1.0 uncertified" G NOTDONE ; Remove line when routine is completed
8 S FILENAME="VEPERVER_"_$J_".txt"
9 ; depending on the OS, we get the directory and decrypt command
10 I +^DD("OS")=18 D ;for Cache' we need to know which OS it's running under
11 . S OS=$S($ZV["VMS":"VMS",$ZV["Windows":"NT",$ZV["NT":"NT",$ZV["UNIX":"UNIX",1:"UNK")
12 . I OS="NT" S ROOT="C:\TEMP\",DECRYPT="S X=$ZF(-1,""decrypt etc"")" ;What's the DOS command to decrypt?
13 . I OS'="NT" S ERROR=1
14 ;
15 I +^DD("OS")=17 D ;for GT.M(VAX) ... Is this needed?
16 . S ROOT=""
17 . S ERROR=1 ;Since we don't have the code for this yet
18 ;
19 I +^DD("OS")=19 D ;for GT.M under UNIX
20 . S ROOT="/tmp/"
21 . S DECRYPT="ZSYstem ""echo Jix4uXDB | gpg --passphrase-fd 0 --output "_ROOT_FILENAME_" --decrypt "_ROOT_FILENAME_".asc"""
22 ;
23 I $D(ERROR) G EXIT
24 ;
25 D OPEN^%ZISH("OUTFILE",ROOT,FILENAME_".asc","W")
26 I POP G EXIT
27 U IO
28 S LINE=0 F S LINE=$O(^XTMP("VEPERVER",LINE,0)) Q:LINE'>0 S TEXT=^(LINE) W TEXT,!
29 D CLOSE^%ZISH("OUTFILE")
30 ;
31 X @DCRYPT ; invoke the decryption appropriate to the OS
32 ; Now, read in the decrypted text
33 S Y=$$FTG^%ZISH(ROOT,FILENAME,$NA(^TMP($J,1,0)),2) I 'Y W !,"Error copying to global" G EXIT
34 ;
35NOTDONE ; and display the text
36 W #!!?21,$C(27),"[33m",$C(27),"[31m"
37 S LINE=0 F S LINE=$O(^TMP($J,LINE)) Q:LINE'>0 W !,^TMP($J,LINE,0)
38 W !!,$C(27),"[0m",?30,"Press a key to continue" R ANS#1
39 G EXIT
40 ;
41LOADPGP ; Load the PGP MESSAGE into ^XTMP
42 S SAVEDUZ=DUZ,DUZ=.5 N ROOT,DIR,FILENAME K ^XTMP("VEPERVER")
43 S DIR(0)="F^2:60",DIR("A")="Full path, up to but not including patch names" D ^DIR G:Y="^" EXIT S ROOT=Y
44 S DIR(0)="F^2:60",DIR("A")="Enter the file name" D ^DIR G:Y="^" EXIT S FILENAME=Y
45 S Y=$$FTG^%ZISH(ROOT,FILENAME,$NA(^XTMP("VEPERVER",1,0)),2) I 'Y W !,"Error copying to global" G EXIT
46 S ^XTMP("VEPERVER",0)="3990101^"_DT_"^PGP MESSAGE for WorldVistA EHR certified" ; make it SACC compliant
47EXIT S DUZ=SAVEDUZ K ^TMP($J)
48 Q
Note: See TracBrowser for help on using the repository browser.