source: FOIAVistA/tag/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGRRPSXX.m@ 1416

Last change on this file since 1416 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 3.1 KB
Line 
1DGRRPSXX ; ALB/SGG - DGRR patient services - TEST MUMPS SIDE COMPONENTS ; Compiled December 9, 2003 15:38:25
2 ;;5.3;Registration;**557**;Aug 13, 1993
3 ;
4DOC ; This routine is ======== FOR TESTING PURPOSES ONLY =========
5 ;
6 ; It can be called to print out an XML doc from the mumps database
7 ; for one patient record by inputing that patients DFN
8 ; eg D TEST^DGRRPSXX("DFN",dfn#,,)
9 ; or to get the XML from a patient ICN
10 ; eg D TEST^DGRRPSXX("ICN",icn#,,)
11 ;
12 ; it can also be used to run the mumps software against every patient DFN
13 ; in the database, NOT RECOMMENDED eg TEST^DGRRPSXX(,,1,)
14 ; or against every patient ICN in the database,
15 ; NOT RECOMMENDED EITHER eg TEST^DGRRPSXX(,,1,)
16 ;
17 ;
18 ; NOTE: INTRACE and OUTTRACE line tags have been commented out in DGRRPSGT
19 ; to prevent the building of the XTMP global. If this routine is
20 ; needed for testing these comments will need to be removed from DGRRPSGT
21 ; for TEST^DGRRPSXX to work correctly.
22 ;
23 ;
24TEST(TYPE,NUM,ALLICN,ALLDFN,REQDT) ;
25 ; TYPE DFN OR ICN
26 ; NUM DFN# OR ICN#
27 ;
28 ;
29 ;
30 NEW ICNALL,DFNALL,PTID,PARAMS
31 ;
32 I ($G(ALLICN)_$G(ALLDFN))="" D Q
33 .SET PARAMS("PatientId_Type")=$G(TYPE)
34 .SET PARAMS("PatientId")=$G(NUM)
35 .SET PARAMS("REQUESTED_DATE")=$G(REQDT)
36 .I ($G(TYPE)="")!($G(NUM)="") DO
37 ..; default parameters if not defined
38 ..SET PARAMS("PatientId_Type")="ICN"
39 ..SET PARAMS("PatientId")="5000000199"
40 .DO APPLY
41 ;
42 I $G(ALLICN)'="" N ICN SET ICN="" FOR SET ICN=$O(^DPT("AICN",ICN)) QUIT:ICN="" DO
43 .SET PARAMS("PatientId")=ICN
44 .SET PARAMS("PatientId_Type")="ICN"
45 .DO APPLY
46 ;
47 I $G(ALLDFN)'="" N DFN SET DFN=0 FOR SET DFN=$O(^DPT(DFN)) QUIT:'+DFN DO
48 .SET PARAMS("PatientId")=DFN
49 .SET PARAMS("PatientId_Type")="DFN"
50 .DO APPLY
51 QUIT
52APPLY ;
53 SET PARAMS("UserId")="User ID supplied?"
54 SET PARAMS("UserInstitution")="User Institution Supplied?"
55 SET PARAMS("PrimaryDemo")=1
56 SET PARAMS("SecondaryDemo")=1
57 SET PARAMS("TertiaryDemo")=1
58 SET PARAMS("MainAddress")=1
59 SET PARAMS("TemporaryAddress")=1
60 SET PARAMS("ConfidentialAddress")=1
61 SET PARAMS("ContactInfo")=1
62 SET PARAMS("ADTInfo")=1
63 SET PARAMS("EnrollEligibility")=1
64 SET PARAMS("Incompetent")=1
65 N RESULT
66 DO PATIENT^DGRRPSGT(.RESULT,.PARAMS)
67 WRITE !! DO VIEWLAST() WRITE !!
68 QUIT
69 ;
70VIEWLAST(TRACENO) ; ENTER(-1) TO GET THE ONE BEFORE LAST
71 NEW I
72 IF $G(TRACENO)<0 SET TRACENO=($O(^XTMP("DGRRPS","TRACE",""),-1))+TRACENO
73 IF $G(TRACENO)="" SET TRACENO=($O(^XTMP("DGRRPS","TRACE",""),-1))
74 WRITE !!,"<< RESULT DATA FOR TRACENO: ",TRACENO," >>"
75 WRITE !!,"data:",!,"=====",!
76 SET I="" FOR SET I=$O(^XTMP("DGRRPS","TRACE",TRACENO,"DATA",I)) QUIT:I="" DO
77 .WRITE !,^XTMP("DGRRPS","TRACE",TRACENO,"DATA",I)
78 WRITE !!,"parameters:",!,"===========",!
79 SET I="" FOR SET I=$O(^XTMP("DGRRPS","TRACE",TRACENO,"PARAMS",I)) QUIT:I="" DO
80 .WRITE !,I,?30,^XTMP("DGRRPS","TRACE",TRACENO,"PARAMS",I)
81 WRITE !!,"<< END OF DATA FOR TRACENO: ",TRACENO," >>",!
82 QUIT
83 ;
84TESTERR ; test error
85 SET PARAMS("PatientId_Type")="XZZZICN"
86 SET PARAMS("PatientId")=" ICN: 5000000199^852098"
87 SET PARAMS("TemporaryAddress")=1
88 SET PARAMS("ConfidentialAddress")=1
89 DO PATIENT^DGRRPSGT(.RESULT,.PARAMS)
90 WRITE !! DO VIEWLAST() WRITE !!
91 QUIT
Note: See TracBrowser for help on using the repository browser.