VistA-ccr/p/CCRDPTT.m

44 lines
2.0 KiB
Mathematica

CCRDPTT ; Unit Tester...
;;0.1;CCRCCD;;Jun 15, 2008;
;
;Copyright 2008 WorldVistA. Licensed under the terms of the GNU
;General Public License See attached copy of the License.
;
;This program is free software; you can redistribute it and/or modify
;it under the terms of the GNU General Public License as published by
;the Free Software Foundation; either version 2 of the License, or
;(at your option) any later version.
;
;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;GNU General Public License for more details.
;
;You should have received a copy of the GNU General Public License along
;with this program; if not, write to the Free Software Foundation, Inc.,
;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
; Get the functions in the routine using Rick's routine
; STATS(0)="CCRDPT^3080626.190908^396^14094^6414499860"
; STATS(1,0)="CCRDPT ;CCRCCD/SMH - Routines to Extract Patient Data for CCDCCR; 6/15/08"
; STATS(2,0)=" ;;0.1;CCRCCD;;Jun 15, 2008;"
; STATS(84,0)="INIT(DFN) ; Copy DFN global to a local variable; PUBLIC"
; STATS(93,0)="DESTROY ; Kill local variable; PUBLIC"
; STATS(99,0)="FAMILY() ; Family Name; PUBLIC; Extrinsic"
; STATS(105,0)="GIVEN() ; Given Name; PUBLIC; Extrinsic"
; STATS(111,0)="MIDDLE() ; Middle Name; PUBLIC; Extrinsic "
; etc.
;
; Load Routine Entry points; We get a sweeeeeet array
D ANALYZE^ARJTXRD("CCRDPT",.OUT) ; Analyze a routine in the directory
N X,Y
; Select Patient
S DIC=2,DIC(0)="AEMQ" D ^DIC
;
W "You have selected patient "_Y,!!
N I S I=89 F S I=$O(OUT(I)) Q:I="ALINE" D
. W "OUT("_I_",0)"_" is "_$P(OUT(I,0)," ")_" "
. W "valued at "
. W @("$$"_$P(OUT(I,0),"(DFN)")_"^"_"CCRDPT"_"("_$P(Y,"^")_")")
. W !
Q