source: FOIAVistA/tag/r/SCHEDULING-SD-SC/SDSCLM.m@ 951

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

initial load of FOIAVistA 6/30/08 version

File size: 2.3 KB
Line 
1SDSCLM ;ALB/JAM/RBS - ASCD Encounter LISTMAN ; 3/7/07 12:42pm
2 ;;5.3;Scheduling;**495**;Aug 13, 1993;Build 50
3 ;;MODIFIED FOR NATIONAL RELEASE from a Class III software product
4 ;;known as Service Connected Automated Monitoring (SCAM).
5 ;
6 Q
7EN ; -- main entry point for SDSC REVIEW
8 N SDSCEDIT S SDSCEDIT=1
9 D EN^VALM("SDSC REVIEW")
10 Q
11 ;
12HDR ; -- header code
13 S VALMHDR(1)="The Service Connected status needs to be reviewed for the following encounters."
14 S VALMHDR(2)="Selected Date Range: "_$$FMTE^XLFDT(SDSCBDT,"1Z")_" - "_$$FMTE^XLFDT(SDEDT,"1Z")
15 S VALMHDR(3)=" "
16 Q
17 ;
18INIT ; -- init variables and list array
19 ;
20RBLD ; Rebuild
21 N SDSCDIV
22 D CLEAN^VALM10
23 K ^TMP("SDSCENC",$J),^TMP($J,"SDSCENC")
24 S SDSCDIV=$S(SDSCDVSL'[SDSCDVLN:","_SDSCDVSL,1:"")
25 S SDCNT=0
26 I SDSCTAT'="" D RBLD1
27 I SDSCTAT="" D S SDSCTAT=""
28 . F SDSCTAT="N","R","C" D RBLD1
29 ;
30 ; -- set null message
31 I 'SDCNT D
32 . D SET^VALM10(1," ")
33 . D SET^VALM10(2," >>> No Encounter's to review for Date Range selected.")
34 . S ^TMP($J,"SDSCENC",1)=1,^(2)=2
35 ;
36 S VALMCNT=$S(SDCNT<1:1,1:SDCNT)
37 Q
38RBLD1 ;
39 N SDOEDT,SDOEDAT,STATUS,SDOE,SDECDT,SDPAT,X,DFN,SDERR,VADM,SCVST,SDV0
40 S SDOEDT=SDSCTDT,STATUS=$$EXTERNAL^DILFD(409.48,.05,"F",SDSCTAT,"SDERR")
41 F S SDOEDT=$O(^SDSC(409.48,"C",SDSCTAT,SDOEDT)) Q:SDOEDT=""!(SDOEDT\1>SDEDT) D
42 . S SDOE=""
43 . F S SDOE=$O(^SDSC(409.48,"C",SDSCTAT,SDOEDT,SDOE)) Q:SDOE="" D
44 .. I SDSCDIV'="",(","_SDSCDIV_",")'[(","_$P(^SDSC(409.48,SDOE,0),U,12)_",") Q
45 .. S SDOEDAT=$G(^SCE(SDOE,0)) Q:SDOEDAT=""
46 .. S SDV0=$P(SDOEDAT,U,5),SCVST=$$GET1^DIQ(9000010,SDV0_",",80001,"I")
47 .. I SCVST'=SCOPT,SCOPT'=2 Q
48 .. S SDCNT=SDCNT+1
49 .. S SDECDT=$P(SDOEDAT,U,1),SDPAT=$P(SDOEDAT,U,2)
50 .. S SDECDT=$$FMTE^XLFDT(SDECDT,"5Z")
51 .. S DFN=SDPAT D DEM^VADPT
52 .. S SDPAT=$E(VADM(1),1,25)_" ("_$E($P(VADM(2),U),6,9)_")"
53 .. S X=$$SETFLD^VALM1(SDCNT," ","LINENUM")
54 .. S X=$$SETFLD^VALM1(SDOE,X,"ENCNO")
55 .. S X=$$SETFLD^VALM1(SDECDT,X,"ENCDT")
56 .. S X=$$SETFLD^VALM1(SDPAT,X,"PAT")
57 .. S X=$$SETFLD^VALM1(STATUS,X,"STAT")
58 .. S ^TMP($J,"SDSCENC",SDCNT)=SDOE
59 .. D SET^VALM10(SDCNT,X)
60 D KVA^VADPT
61 Q
62 ;
63HELP ; -- help code
64 N X
65 S X="?" D DISP^XQORM1 W !!
66 Q
67 ;
68EXIT ; -- exit code
69 K VALMHDR,VALMCNT
70 K ^TMP("SDSCENC",$J),^TMP($J,"SDSCENC")
71 K SDCNT,SDEDT,SDSCBDT,SDSCDVLN,SDSCDVSL,SDSCEDT,SDSCTAT,SDSCTDT
72 Q
73 ;
74EXPND ; -- expand code
75 Q
Note: See TracBrowser for help on using the repository browser.