Changeset 1337 for ccr/branches/ohum/p/C0CSYS.m
- Timestamp:
- Jan 4, 2012, 9:40:24 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/branches/ohum/p/C0CSYS.m
r1333 r1337 1 C0CSYS 2 ;;1.0;C0C;;May 19, 2009;Build 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 SYSNAME() 30 31 32 33 SYSVER() 34 35 36 PTST(DFN) 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 1 C0CSYS ;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 ; 29 SYSNAME() ;Get EHR System Name; PUBLIC; Extrinsic 30 Q:$G(DUZ("AG"))="I" "RPMS" 31 Q "WorldVistA EHR/VOE" 32 ; 33 SYSVER() ;Get EHR System Version; PUBLIC; Extrinsic 34 Q "1.0" 35 ; 36 PTST(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 TracChangeset
for help on using the changeset viewer.