source: WorldVistAEHR/trunk/r/CLINICAL_CASE_REGISTRIES-ROR/RORHDT01.m@ 1535

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

initial load of WorldVistAEHR

File size: 1.7 KB
Line 
1RORHDT01 ;HCIOFO/SG - HISTORICAL DATA EXTRACTION STATUS ; 12/21/05 3:41pm
2 ;;1.5;CLINICAL CASE REGISTRIES;;Feb 17, 2006
3 ;
4 Q
5 ;
6 ;***** DISPLAYS THE LATEST TASK LOG
7 ;
8 ; HDEIEN Data Extract IEN
9 ; TASKIEN Task IEN
10 ;
11 ; Return Values:
12 ; <0 Error code
13 ; 0 Ok
14 ;
15LOG(HDEIEN,TASKIEN) ;
16 N BY,FIC,FR,IENS,INFO,IOP,L,LOGIEN,RC,TASK,TO
17 ;--- Get the task number
18 S TASK=$$TASKNUM^RORHDTUT(HDEIEN,TASKIEN)
19 Q:TASK<0 TASK
20 I 'TASK D Q 0
21 . W !!,"Sorry. It appears that this task has not been run."
22 ;--- Get the task info (Log IEN, in particular)
23 S RC=$$TASKINFO^RORTSK02(TASK,.INFO,"E") Q:RC<0 RC
24 S LOGIEN=+$G(INFO(12))
25 ;--- Print the log
26 I LOGIEN>0,$D(^RORDATA(798.7,LOGIEN)) D
27 . S L=0,DIC=798.7
28 . S BY="NUMBER;@,4,.01;@",FLDS="[ROR LOG]"
29 . S (FR,TO)=LOGIEN
30 . W ! D EN1^DIP
31 E W !!,"Sorry. The log is not available."
32 Q 0
33 ;
34 ;***** DISPLAYS DATA EXTRACTION STATUS
35 ;
36 ; HDEIEN Data Extract IEN
37 ;
38 ; Return Values:
39 ; <0 Error code
40 ; 0 Ok
41 ;
42STATUS(HDEIEN) ;
43 N I,IENS,REGLST,RORBUF,RORMSG,TMP
44 ;--- Get values from the main record
45 S IENS=(+HDEIEN)_","
46 D GETS^DIQ(799.6,IENS,".01;.03;.04;2;3*","EI","RORBUF","RORMSG")
47 Q:$G(DIERR) $$DBS^RORERR("RORMSG",-9,,,799.6,IENS)
48 ;--- Compile the list of registries
49 S (I,REGLST)=""
50 F S I=$O(RORBUF(799.63,I)) Q:I="" D
51 . S TMP=$G(RORBUF(799.63,I,.01,"E"))
52 . S:TMP'="" REGLST=REGLST_", "_TMP
53 ;--- Display the data extraction information
54 W !
55 W !,"Name: ",RORBUF(799.6,IENS,.01,"E")
56 W !,"Registries: ",$P(REGLST,", ",2,999)
57 W !,"Date Range: ",$G(RORBUF(799.6,IENS,.03,"E"))
58 W " -- ",$G(RORBUF(799.6,IENS,.04,"E"))
59 W !,"Output Dir: ",$G(RORBUF(799.6,IENS,2,"E")),!
60 ;--- Display the task list
61 Q $$TASKLIST^RORHDTUT(HDEIEN)
Note: See TracBrowser for help on using the repository browser.