source: ccr/trunk/p/C0CSYS.m@ 1206

Last change on this file since 1206 was 1206, checked in by George Lilly, 13 years ago

removed tabs after certification

File size: 2.2 KB
Line 
1C0CSYS ;WV/C0C/SMH - Routine to Get EHR System Information;6JUL2008
2 ;;1.0;C0C;;May 19, 2009;Build 38
3 ; Copyright 2008 WorldVistA. Licensed under the terms of the GNU
4 ; General Public License See attached copy of the License.
5 ;
6 ; This program is free software; you can redistribute it and/or modify
7 ; it under the terms of the GNU General Public License as published by
8 ; the Free Software Foundation; either version 2 of the License, or
9 ; (at your option) any later version.
10 ;
11 ; This program is distributed in the hope that it will be useful,
12 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ; GNU General Public License for more details.
15 ;
16 ; You should have received a copy of the GNU General Public License along
17 ; with this program; if not, write to the Free Software Foundation, Inc.,
18 ; 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 ;
20 W "Enter at appropriate points." Q
21 ;
22 ; Originally, I was going to use VEPERVER, but VEPERVER
23 ; actually kills ^TMP($J), outputs it to the screen in a user-friendly
24 ; manner (press any key to continue),
25 ; and is really a very half finished routine
26 ;
27 ; So for now, I am hard-coding the values.
28 ;
29SYSNAME() ;Get EHR System Name; PUBLIC; Extrinsic
30 Q:$G(DUZ("AG"))="I" "RPMS"
31 Q "WorldVistA EHR/VOE"
32 ;
33SYSVER() ;Get EHR System Version; PUBLIC; Extrinsic
34 Q "1.0"
35 ;
36PTST(DFN) ;TEST TO SEE IF PATIENT MERGED OR A TEST PATIENT
37 ; DFN = IEN of the Patient to be tested
38 ; 1 = Merged or Test Patient
39 ; 0 = Non-test Patient
40 ;
41 I DFN="" Q 0 ; BAD DFN PASSED
42 I $D(^DPT(DFN,-9)) Q 1 ;This patient has been merged
43 I $G(^DPT(DFN,0))="" Q 1 ;Missing zeroth node <---add
44 ;
45 I '$D(CCRTEST) S CCRTEST=1 ; DEFAULT IS THAT WE ARE TESTING
46 I CCRTEST Q 0 ; IF WE ARE TESTING, DON'T REJECT TEST PATIENTS
47 N DIERR,DATA
48 I $$TESTPAT^VADPT(DFN) Q 1 ; QUIT IF IT'S A VA TEST PATIENT
49 S DATA=+$$GET1^DIQ(2,DFN_",",.6,"I") ;Test Patient Indicator
50 ; 1 = Test Patient
51 ; 0 = Non-test Patient
52 I DATA Q DATA
53 S DATA=$$GET1^DIQ(2,DFN_",",.09,"I") ;SSN test
54 D CLEAN^DILF
55 I "Pp"[$E(DATA,$L(DATA),$L(DATA)) Q 0 ;Allow Pseudo SSN
56 I $E(DATA,1,3)="000" Q 1
57 I $E(DATA,1,3)="666" Q 1
58 Q 0
59 ;
Note: See TracBrowser for help on using the repository browser.