VistA-WorldVistAEHR/r/CLINICAL_CASE_REGISTRIES-ROR/RORX000.m

48 lines
1.6 KiB
Mathematica

RORX000 ;HCIOFO/SG - DUMMY REPORT ; 9/29/03 3:51pm
;;1.5;CLINICAL CASE REGISTRIES;;Feb 17, 2006
;
Q
;
;*****
BIGDUMMY(RORTSK) ;
N BODY,FLT,IEN,IENS,NAME,NODE,PARAMS,PATIENT,REPORT,RORBUF,RORMSG,TMP
;---
S REPORT=$$ADDVAL^RORTSK11(RORTSK,"REPORT")
;--- Dump the report parameters
S BODY=$$ADDVAL^RORTSK11(RORTSK,"PARAMETERS",,REPORT)
S NODE=$NA(RORTSK("PARAMS")),FLT=$P(NODE,")")_","
F S NODE=$Q(@NODE) Q:'(NODE[FLT) D
. S TMP=$$ADDVAL^RORTSK11(RORTSK,"PARAMETER",NODE_" = "_@NODE,BODY)
;--- List of patients
S BODY=$$ADDVAL^RORTSK11(RORTSK,"PATIENTS",,REPORT)
S NAME=""
F S NAME=$O(^DPT("B",NAME)) Q:NAME="" D
. S IEN=0
. F S IEN=$O(^DPT("B",NAME,IEN)) Q:IEN'>0 D
. . S IENS=IEN_"," K RORBUF
. . D GETS^DIQ(2,IENS,".01;.02;.03;.06;.09;","E","RORBUF","RORMSG")
. . S PATIENT=$$ADDVAL^RORTSK11(RORTSK,"PATIENT",,BODY)
. . S TMP=$G(RORBUF(2,IENS,.01,"E"))
. . D ADDVAL^RORTSK11(RORTSK,"NAME",TMP,PATIENT)
. . S TMP=$G(RORBUF(2,IENS,.02,"E"))
. . D ADDVAL^RORTSK11(RORTSK,"SEX",TMP,PATIENT)
. . S TMP=$G(RORBUF(2,IENS,.03,"E"))
. . D ADDVAL^RORTSK11(RORTSK,"DOB",TMP,PATIENT)
. . S TMP=$G(RORBUF(2,IENS,.06,"E"))
. . D ADDVAL^RORTSK11(RORTSK,"RACE",TMP,PATIENT)
. . S TMP=$G(RORBUF(2,IENS,.09,"E"))
. . D ADDVAL^RORTSK11(RORTSK,"SSN",TMP,PATIENT)
Q 0
;
;*****
DUMMY(RORTSK) ;
N FLT,NODE,PARAMS,REPORT,TMP
;---
S REPORT=$$ADDVAL^RORTSK11(RORTSK,"REPORT")
S PARAMS=$$ADDVAL^RORTSK11(RORTSK,"PARAMETERS",,REPORT)
;--- Dump the report parameters
S NODE=$NA(RORTSK("PARAMS")),FLT=$P(NODE,")")_","
F S NODE=$Q(@NODE) Q:'(NODE[FLT) D
. S TMP=$$ADDVAL^RORTSK11(RORTSK,"PARAMETER",NODE_" = "_@NODE,PARAMS)
Q 0