Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: DGRRPSXX

DGRRPSXX.m

Go to the documentation of this file.
  1. DGRRPSXX ; ALB/SGG - DGRR patient services - TEST MUMPS SIDE COMPONENTS ; Compiled December 9, 2003 15:38:25
  1. ;;5.3;Registration;**557,1015**;Aug 13, 1993;Build 21
  1. ;
  1. DOC ; This routine is ======== FOR TESTING PURPOSES ONLY =========
  1. ;
  1. ; It can be called to print out an XML doc from the mumps database
  1. ; for one patient record by inputing that patients DFN
  1. ; eg D TEST^DGRRPSXX("DFN",dfn#,,)
  1. ; or to get the XML from a patient ICN
  1. ; eg D TEST^DGRRPSXX("ICN",icn#,,)
  1. ;
  1. ; it can also be used to run the mumps software against every patient DFN
  1. ; in the database, NOT RECOMMENDED eg TEST^DGRRPSXX(,,1,)
  1. ; or against every patient ICN in the database,
  1. ; NOT RECOMMENDED EITHER eg TEST^DGRRPSXX(,,1,)
  1. ;
  1. ;
  1. ; NOTE: INTRACE and OUTTRACE line tags have been commented out in DGRRPSGT
  1. ; to prevent the building of the XTMP global. If this routine is
  1. ; needed for testing these comments will need to be removed from DGRRPSGT
  1. ; for TEST^DGRRPSXX to work correctly.
  1. ;
  1. ;
  1. TEST(TYPE,NUM,ALLICN,ALLDFN,REQDT) ;
  1. ; TYPE DFN OR ICN
  1. ; NUM DFN# OR ICN#
  1. ;
  1. ;
  1. ;
  1. NEW ICNALL,DFNALL,PTID,PARAMS
  1. ;
  1. I ($G(ALLICN)_$G(ALLDFN))="" D Q
  1. .SET PARAMS("PatientId_Type")=$G(TYPE)
  1. .SET PARAMS("PatientId")=$G(NUM)
  1. .SET PARAMS("REQUESTED_DATE")=$G(REQDT)
  1. .I ($G(TYPE)="")!($G(NUM)="") DO
  1. ..; default parameters if not defined
  1. ..SET PARAMS("PatientId_Type")="ICN"
  1. ..SET PARAMS("PatientId")="5000000199"
  1. .DO APPLY
  1. ;
  1. I $G(ALLICN)'="" N ICN SET ICN="" FOR SET ICN=$O(^DPT("AICN",ICN)) QUIT:ICN="" DO
  1. .SET PARAMS("PatientId")=ICN
  1. .SET PARAMS("PatientId_Type")="ICN"
  1. .DO APPLY
  1. ;
  1. I $G(ALLDFN)'="" N DFN SET DFN=0 FOR SET DFN=$O(^DPT(DFN)) QUIT:'+DFN DO
  1. .SET PARAMS("PatientId")=DFN
  1. .SET PARAMS("PatientId_Type")="DFN"
  1. .DO APPLY
  1. QUIT
  1. APPLY ;
  1. SET PARAMS("UserId")="User ID supplied?"
  1. SET PARAMS("UserInstitution")="User Institution Supplied?"
  1. SET PARAMS("PrimaryDemo")=1
  1. SET PARAMS("SecondaryDemo")=1
  1. SET PARAMS("TertiaryDemo")=1
  1. SET PARAMS("MainAddress")=1
  1. SET PARAMS("TemporaryAddress")=1
  1. SET PARAMS("ConfidentialAddress")=1
  1. SET PARAMS("ContactInfo")=1
  1. SET PARAMS("ADTInfo")=1
  1. SET PARAMS("EnrollEligibility")=1
  1. SET PARAMS("Incompetent")=1
  1. N RESULT
  1. DO PATIENT^DGRRPSGT(.RESULT,.PARAMS)
  1. WRITE !! DO VIEWLAST() WRITE !!
  1. QUIT
  1. ;
  1. VIEWLAST(TRACENO) ; ENTER(-1) TO GET THE ONE BEFORE LAST
  1. NEW I
  1. IF $G(TRACENO)<0 SET TRACENO=($O(^XTMP("DGRRPS","TRACE",""),-1))+TRACENO
  1. IF $G(TRACENO)="" SET TRACENO=($O(^XTMP("DGRRPS","TRACE",""),-1))
  1. WRITE !!,"<< RESULT DATA FOR TRACENO: ",TRACENO," >>"
  1. WRITE !!,"data:",!,"=====",!
  1. SET I="" FOR SET I=$O(^XTMP("DGRRPS","TRACE",TRACENO,"DATA",I)) QUIT:I="" DO
  1. .WRITE !,^XTMP("DGRRPS","TRACE",TRACENO,"DATA",I)
  1. WRITE !!,"parameters:",!,"===========",!
  1. SET I="" FOR SET I=$O(^XTMP("DGRRPS","TRACE",TRACENO,"PARAMS",I)) QUIT:I="" DO
  1. .WRITE !,I,?30,^XTMP("DGRRPS","TRACE",TRACENO,"PARAMS",I)
  1. WRITE !!,"<< END OF DATA FOR TRACENO: ",TRACENO," >>",!
  1. QUIT
  1. ;
  1. TESTERR ; test error
  1. SET PARAMS("PatientId_Type")="XZZZICN"
  1. SET PARAMS("PatientId")=" ICN: 5000000199^852098"
  1. SET PARAMS("TemporaryAddress")=1
  1. SET PARAMS("ConfidentialAddress")=1
  1. DO PATIENT^DGRRPSGT(.RESULT,.PARAMS)
  1. WRITE !! DO VIEWLAST() WRITE !!
  1. QUIT