source: ccr/trunk/p/CCRSYS.m@ 139

Last change on this file since 139 was 139, checked in by George Lilly, 16 years ago

Check for Merged or Test patients. New parameter CCRTEST=0 if not testing

File size: 2.2 KB
Line 
1CCRSYS ;CCDCCR/SMH - Routine to Get EHR System Information;6JUL2008
2 ;;0.1;CCDCCR;;;
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 "WorldVistA EHR/VOE"
31 ;
32SYSVER() ;Get EHR System Version; PUBLIC; Extrinsic
33 Q "1.0"
34 ;
35PTST(DFN) ;TEST TO SEE IF PATIENT MERGED OR A TEST PATIENT
36 ; DFN = IEN of the Patient to be tested
37 ; 1 = Merged or Test Patient
38 ; 0 = Non-test Patient
39 ;
40 I $D(^DPT(DFN,-9)) Q 1 ;This patient has been merged
41 I $G(^DPT(DFN,0))="" Q 1 ;Missing zeroth node <---add
42 ;
43 I '$D(CCRTEST) S CCRTEST=1 ; DEFAULT IS THAT WE ARE TESTING
44 I 'CCRTEST D ; IF WE ARE NOT TESTING, SKIP TEST PATIENTS
45 . N DIERR,DATA
46 . S DATA=+$$GET1^DIQ(2,DFN_",",.6,"I") ;Test Patient Indicator
47 . ; 1 = Test Patient
48 . ; 0 = Non-test Patient
49 . I DATA Q DATA
50 . S DATA=$$GET1^DIQ(2,DFN_",",.09,"I") ;SSN test
51 . D CLEAN^DILF
52 . I $E(DATA,1,3)="000" Q 1
53 . I $E(DATA,1,3)="666" Q 1
54 Q 0
55 ;
Note: See TracBrowser for help on using the repository browser.