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

Last change on this file since 1778 was 1586, checked in by Sam Habiel, 12 years ago

Changed license to AGPL. Some clean-up for XINDEX

  • Property svn:mergeinfo set to (toggle deleted branches)
    /ccr/branches/ohum/o-old/p/C0CSYS.m1290
    /ccr/branches/ohum/p/C0CSYS.m1291-1543
    /ccr/branches/ohum/p/p/C0CSYS.m1287-1289
File size: 2.1 KB
Line 
1C0CSYS ;WV/C0C/SMH - Routine to Get EHR System Information;6JUL2008
2 ;;1.2;CCD/CCR GENERATION UTILITIES;;Oct 30, 2012;Build 50
3 ; Copyright 2008 WorldVistA.
4 ;
5 ; This program is free software: you can redistribute it and/or modify
6 ; it under the terms of the GNU Affero General Public License as
7 ; published by the Free Software Foundation, either version 3 of the
8 ; License, or (at your option) any later version.
9 ;
10 ; This program is distributed in the hope that it will be useful,
11 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ; GNU Affero General Public License for more details.
14 ;
15 ; You should have received a copy of the GNU Affero General Public License
16 ; along with this program. If not, see <http://www.gnu.org/licenses/>.
17 ;
18 W "Enter at appropriate points." Q
19 ;
20 ; Originally, I was going to use VEPERVER, but VEPERVER
21 ; actually kills ^TMP($J), outputs it to the screen in a user-friendly
22 ; manner (press any key to continue),
23 ; and is really a very half finished routine
24 ;
25 ; So for now, I am hard-coding the values.
26 ;
27SYSNAME() ;Get EHR System Name; PUBLIC; Extrinsic
28 Q:$G(DUZ("AG"))="I" "RPMS"
29 Q "WorldVistA EHR/VOE"
30 ;
31SYSVER() ;Get EHR System Version; PUBLIC; Extrinsic
32 Q "1.0"
33 ;
34PTST(DFN) ;TEST TO SEE IF PATIENT MERGED OR A TEST PATIENT
35 ; DFN = IEN of the Patient to be tested
36 ; 1 = Merged or Test Patient
37 ; 0 = Non-test Patient
38 ;
39 I DFN="" Q 0 ; BAD DFN PASSED
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 Q 0 ; IF WE ARE TESTING, DON'T REJECT TEST PATIENTS
45 N DIERR,DATA
46 I $$TESTPAT^VADPT(DFN) Q 1 ; QUIT IF IT'S A VA TEST PATIENT
47 S DATA=+$$GET1^DIQ(2,DFN_",",.6,"I") ;Test Patient Indicator
48 ; 1 = Test Patient
49 ; 0 = Non-test Patient
50 I DATA Q DATA
51 S DATA=$$GET1^DIQ(2,DFN_",",.09,"I") ;SSN test
52 D CLEAN^DILF
53 I "Pp"[$E(DATA,$L(DATA),$L(DATA)) Q 0 ;Allow Pseudo SSN
54 I $E(DATA,1,3)="000" Q 1
55 I $E(DATA,1,3)="666" Q 1
56 Q 0
57 ;
Note: See TracBrowser for help on using the repository browser.