source: FOIAVistA/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGMSTD.m@ 1528

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

initial load of FOIAVistA 6/30/08 version

File size: 1.7 KB
Line 
1DGMSTD ; ALB/SCK - MST Status Display LM Interface ; 17-DEC-1998
2 ;;5.3;Registration;**195,379**;Aug 13, 1993
3 Q
4 ;
5EN ; -- main entry point for DGMST STATUS DISPLAY
6 D EN^VALM("DGMST STATUS DISPLAY")
7 Q
8 ;
9HDR ; -- header code
10 N DFN,VA,VADM
11 S DFN=$G(MSTDFN)
12 D DEM^VADPT
13 S VALMHDR(1)="MST Status Information for Patient: "_$$LOWER^VALM1(VADM(1))_" ("_$P(VADM(2),U,2)_")"
14 S VALMHDR(2)=" "
15 D KVAR^VADPT
16 Q
17 ;
18INIT ; -- init variables and list array
19 K ^TMP("DGMST DISP",$J)
20 N MSTIEN,MSTDT,DGX,VALMCNT,MST1,MSG,DGMST
21 S VALMCNT=0
22 ;
23 ; Display message if no MST status history exists for patient
24 I '$D(^DGMS(29.11,"C",MSTDFN)) D Q
25 . D SET("")
26 . S MSG="No MST status history is available for this patient"
27 . S DGX="",DGX=$$SETSTR^VALM1(MSG,DGX,5,70)
28 . D SET(DGX),SET("")
29 ;
30 ; Retrieve MST status history for patient
31 S MSTDT="",DGX=""
32 F S MSTDT=$O(^DGMS(29.11,"APDT",MSTDFN,MSTDT),-1) Q:'MSTDT D
33 . S MSTIEN="" F S MSTIEN=$O(^DGMS(29.11,"APDT",MSTDFN,MSTDT,MSTIEN),-1) Q:'MSTIEN D
34 .. S DGMST=$G(^DGMS(29.11,MSTIEN,0))
35 .. S DGX=$$SETFLD^VALM1($$FMTE^XLFDT($P(DGMST,U)),"","DATE")
36 .. S DGX=$$SETFLD^VALM1($P(DGMST,U,3),DGX,"STATUS")
37 .. S MST1=$$NAME^DGMSTAPI(+$P(DGMST,U,4))
38 .. S DGX=$$SETFLD^VALM1($S(MST1]"":MST1,1:""),DGX,"PROVIDER")
39 .. S MST1=$$NAME^DGMSTAPI(+$P(DGMST,U,5))
40 .. S DGX=$$SETFLD^VALM1($S(MST1]"":MST1,1:""),DGX,"USER")
41 .. S MST1=$$GET1^DIQ(4,(+$P(DGMST,U,6))_",",99)
42 .. S DGX=$$SETFLD^VALM1($S(MST1]"":MST1,1:""),DGX,"SITE")
43 .. D SET(DGX)
44 Q
45 ;
46HELP ; -- help code
47 S X="?" D DISP^XQORM1 W !!
48 Q
49 ;
50EXIT ; -- exit code
51 ;S VALMBCK="R"
52 K ^TMP("DGMST DISP",$J)
53 Q
54 ;
55EXPND ; -- expand code
56 Q
57 ;
58SET(X) ;
59 S VALMCNT=VALMCNT+1,^TMP("DGMST DISP",$J,VALMCNT,0)=X
60 Q
Note: See TracBrowser for help on using the repository browser.