DGRRPSXX ; ALB/SGG - DGRR patient services - TEST MUMPS SIDE COMPONENTS ; Compiled December 9, 2003 15:38:25
;;5.3;Registration;**557**;Aug 13, 1993
;
DOC ; This routine is ======== FOR TESTING PURPOSES ONLY =========
;
; It can be called to print out an XML doc from the mumps database
; for one patient record by inputing that patients DFN
; eg D TEST^DGRRPSXX("DFN",dfn#,,)
; or to get the XML from a patient ICN
; eg D TEST^DGRRPSXX("ICN",icn#,,)
;
; it can also be used to run the mumps software against every patient DFN
; in the database, NOT RECOMMENDED eg TEST^DGRRPSXX(,,1,)
; or against every patient ICN in the database,
; NOT RECOMMENDED EITHER eg TEST^DGRRPSXX(,,1,)
;
;
; NOTE: INTRACE and OUTTRACE line tags have been commented out in DGRRPSGT
; to prevent the building of the XTMP global. If this routine is
; needed for testing these comments will need to be removed from DGRRPSGT
; for TEST^DGRRPSXX to work correctly.
;
;
TEST(TYPE,NUM,ALLICN,ALLDFN,REQDT) ;
; TYPE DFN OR ICN
; NUM DFN# OR ICN#
;
;
;
NEW ICNALL,DFNALL,PTID,PARAMS
;
I ($G(ALLICN)_$G(ALLDFN))="" D Q
.SET PARAMS("PatientId_Type")=$G(TYPE)
.SET PARAMS("PatientId")=$G(NUM)
.SET PARAMS("REQUESTED_DATE")=$G(REQDT)
.I ($G(TYPE)="")!($G(NUM)="") DO
..; default parameters if not defined
..SET PARAMS("PatientId_Type")="ICN"
..SET PARAMS("PatientId")="5000000199"
.DO APPLY
;
I $G(ALLICN)'="" N ICN SET ICN="" FOR SET ICN=$O(^DPT("AICN",ICN)) QUIT:ICN="" DO
.SET PARAMS("PatientId")=ICN
.SET PARAMS("PatientId_Type")="ICN"
.DO APPLY
;
I $G(ALLDFN)'="" N DFN SET DFN=0 FOR SET DFN=$O(^DPT(DFN)) QUIT:'+DFN DO
.SET PARAMS("PatientId")=DFN
.SET PARAMS("PatientId_Type")="DFN"
.DO APPLY
QUIT
APPLY ;
SET PARAMS("UserId")="User ID supplied?"
SET PARAMS("UserInstitution")="User Institution Supplied?"
SET PARAMS("PrimaryDemo")=1
SET PARAMS("SecondaryDemo")=1
SET PARAMS("TertiaryDemo")=1
SET PARAMS("MainAddress")=1
SET PARAMS("TemporaryAddress")=1
SET PARAMS("ConfidentialAddress")=1
SET PARAMS("ContactInfo")=1
SET PARAMS("ADTInfo")=1
SET PARAMS("EnrollEligibility")=1
SET PARAMS("Incompetent")=1
N RESULT
DO PATIENT^DGRRPSGT(.RESULT,.PARAMS)
WRITE !! DO VIEWLAST() WRITE !!
QUIT
;
VIEWLAST(TRACENO) ; ENTER(-1) TO GET THE ONE BEFORE LAST
NEW I
IF $G(TRACENO)<0 SET TRACENO=($O(^XTMP("DGRRPS","TRACE",""),-1))+TRACENO
IF $G(TRACENO)="" SET TRACENO=($O(^XTMP("DGRRPS","TRACE",""),-1))
WRITE !!,"<< RESULT DATA FOR TRACENO: ",TRACENO," >>"
WRITE !!,"data:",!,"=====",!
SET I="" FOR SET I=$O(^XTMP("DGRRPS","TRACE",TRACENO,"DATA",I)) QUIT:I="" DO
.WRITE !,^XTMP("DGRRPS","TRACE",TRACENO,"DATA",I)
WRITE !!,"parameters:",!,"===========",!
SET I="" FOR SET I=$O(^XTMP("DGRRPS","TRACE",TRACENO,"PARAMS",I)) QUIT:I="" DO
.WRITE !,I,?30,^XTMP("DGRRPS","TRACE",TRACENO,"PARAMS",I)
WRITE !!,"<< END OF DATA FOR TRACENO: ",TRACENO," >>",!
QUIT
;
TESTERR ; test error
SET PARAMS("PatientId_Type")="XZZZICN"
SET PARAMS("PatientId")=" ICN: 5000000199^852098"
SET PARAMS("TemporaryAddress")=1
SET PARAMS("ConfidentialAddress")=1
DO PATIENT^DGRRPSGT(.RESULT,.PARAMS)
WRITE !! DO VIEWLAST() WRITE !!
QUIT
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDGRRPSXX 3278 printed Dec 13, 2024@02:57:56 Page 2
DGRRPSXX ; ALB/SGG - DGRR patient services - TEST MUMPS SIDE COMPONENTS ; Compiled December 9, 2003 15:38:25
+1 ;;5.3;Registration;**557**;Aug 13, 1993
+2 ;
DOC ; This routine is ======== FOR TESTING PURPOSES ONLY =========
+1 ;
+2 ; It can be called to print out an XML doc from the mumps database
+3 ; for one patient record by inputing that patients DFN
+4 ; eg D TEST^DGRRPSXX("DFN",dfn#,,)
+5 ; or to get the XML from a patient ICN
+6 ; eg D TEST^DGRRPSXX("ICN",icn#,,)
+7 ;
+8 ; it can also be used to run the mumps software against every patient DFN
+9 ; in the database, NOT RECOMMENDED eg TEST^DGRRPSXX(,,1,)
+10 ; or against every patient ICN in the database,
+11 ; NOT RECOMMENDED EITHER eg TEST^DGRRPSXX(,,1,)
+12 ;
+13 ;
+14 ; NOTE: INTRACE and OUTTRACE line tags have been commented out in DGRRPSGT
+15 ; to prevent the building of the XTMP global. If this routine is
+16 ; needed for testing these comments will need to be removed from DGRRPSGT
+17 ; for TEST^DGRRPSXX to work correctly.
+18 ;
+19 ;
TEST(TYPE,NUM,ALLICN,ALLDFN,REQDT) ;
+1 ; TYPE DFN OR ICN
+2 ; NUM DFN# OR ICN#
+3 ;
+4 ;
+5 ;
+6 NEW ICNALL,DFNALL,PTID,PARAMS
+7 ;
+8 IF ($GET(ALLICN)_$GET(ALLDFN))=""
Begin DoDot:1
+9 SET PARAMS("PatientId_Type")=$GET(TYPE)
+10 SET PARAMS("PatientId")=$GET(NUM)
+11 SET PARAMS("REQUESTED_DATE")=$GET(REQDT)
+12 IF ($GET(TYPE)="")!($GET(NUM)="")
Begin DoDot:2
+13 ; default parameters if not defined
+14 SET PARAMS("PatientId_Type")="ICN"
+15 SET PARAMS("PatientId")="5000000199"
End DoDot:2
+16 DO APPLY
End DoDot:1
QUIT
+17 ;
+18 IF $GET(ALLICN)'=""
NEW ICN
SET ICN=""
FOR
SET ICN=$ORDER(^DPT("AICN",ICN))
if ICN=""
QUIT
Begin DoDot:1
+19 SET PARAMS("PatientId")=ICN
+20 SET PARAMS("PatientId_Type")="ICN"
+21 DO APPLY
End DoDot:1
+22 ;
+23 IF $GET(ALLDFN)'=""
NEW DFN
SET DFN=0
FOR
SET DFN=$ORDER(^DPT(DFN))
if '+DFN
QUIT
Begin DoDot:1
+24 SET PARAMS("PatientId")=DFN
+25 SET PARAMS("PatientId_Type")="DFN"
+26 DO APPLY
End DoDot:1
+27 QUIT
APPLY ;
+1 SET PARAMS("UserId")="User ID supplied?"
+2 SET PARAMS("UserInstitution")="User Institution Supplied?"
+3 SET PARAMS("PrimaryDemo")=1
+4 SET PARAMS("SecondaryDemo")=1
+5 SET PARAMS("TertiaryDemo")=1
+6 SET PARAMS("MainAddress")=1
+7 SET PARAMS("TemporaryAddress")=1
+8 SET PARAMS("ConfidentialAddress")=1
+9 SET PARAMS("ContactInfo")=1
+10 SET PARAMS("ADTInfo")=1
+11 SET PARAMS("EnrollEligibility")=1
+12 SET PARAMS("Incompetent")=1
+13 NEW RESULT
+14 DO PATIENT^DGRRPSGT(.RESULT,.PARAMS)
+15 WRITE !!
DO VIEWLAST()
WRITE !!
+16 QUIT
+17 ;
VIEWLAST(TRACENO) ; ENTER(-1) TO GET THE ONE BEFORE LAST
+1 NEW I
+2 IF $GET(TRACENO)<0
SET TRACENO=($ORDER(^XTMP("DGRRPS","TRACE",""),-1))+TRACENO
+3 IF $GET(TRACENO)=""
SET TRACENO=($ORDER(^XTMP("DGRRPS","TRACE",""),-1))
+4 WRITE !!,"<< RESULT DATA FOR TRACENO: ",TRACENO," >>"
+5 WRITE !!,"data:",!,"=====",!
+6 SET I=""
FOR
SET I=$ORDER(^XTMP("DGRRPS","TRACE",TRACENO,"DATA",I))
if I=""
QUIT
Begin DoDot:1
+7 WRITE !,^XTMP("DGRRPS","TRACE",TRACENO,"DATA",I)
End DoDot:1
+8 WRITE !!,"parameters:",!,"===========",!
+9 SET I=""
FOR
SET I=$ORDER(^XTMP("DGRRPS","TRACE",TRACENO,"PARAMS",I))
if I=""
QUIT
Begin DoDot:1
+10 WRITE !,I,?30,^XTMP("DGRRPS","TRACE",TRACENO,"PARAMS",I)
End DoDot:1
+11 WRITE !!,"<< END OF DATA FOR TRACENO: ",TRACENO," >>",!
+12 QUIT
+13 ;
TESTERR ; test error
+1 SET PARAMS("PatientId_Type")="XZZZICN"
+2 SET PARAMS("PatientId")=" ICN: 5000000199^852098"
+3 SET PARAMS("TemporaryAddress")=1
+4 SET PARAMS("ConfidentialAddress")=1
+5 DO PATIENT^DGRRPSGT(.RESULT,.PARAMS)
+6 WRITE !!
DO VIEWLAST()
WRITE !!
+7 QUIT