source: WorldVistAEHR/trunk/r/WOMENS_HEALTH-WV/WVMSTL1.m@ 724

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

initial load of WorldVistAEHR

File size: 2.0 KB
Line 
1WVMSTL1 ;HCIOFO/FT-List Sexual Trauma Data (cont.) ;2/16/01 16:07
2 ;;1.0;WOMEN'S HEALTH;**11,14**;Sep 30, 1998
3 ;
4PRINT ; Print list
5 U IO
6 S WVLINE=$$REPEAT^XLFSTR("-",79),(WVPAGE,WVPOP)=0
7 S WVDATE=$$FMTE^XLFDT($$NOW^XLFDT(),"2")
8 S WVUSER=$$PERSON^WVUTL1(DUZ),WVSORT=$S(WVE=0:"ONE",1:"ALL")
9 S WVTITLE="* LIST SEXUAL TRAUMA DATA *"
10 S WVCRT=$S($E(IOST)="C":1,1:0)
11 S WVTAB=$L(WVTITLE),WVTAB=(80-WVTAB)\2
12 I '$D(^TMP($J,"WVST")) D HDR Q:WVPOP D NODATA
13 I $D(^TMP($J,"WVST")) D HDR Q:WVPOP D DATA
14 I WVCRT&('$D(IO("S"))) D:'WVPOP DIRZ^WVUTL3 W @IOF
15 Q
16HDR ; Report header
17 W:$Y>0 @IOF
18 S WVPAGE=WVPAGE+1
19 W !,?WVTAB,WVTITLE
20 W !,"Report Run by: "_WVUSER,?50," Page: "_WVPAGE
21 W !,"Case Mgr Sort: "_WVSORT,?50,"Run Date: "_WVDATE
22 W !!,"SSN",?14,"PATIENT",?41,"MST & CST VALUES"
23 W !,WVLINE
24 I $D(ZTQUEUED) D STOPCHK^WVUTL10(1) D ;stop background task?
25 .S:$G(ZTSTOP)=1 WVPOP=1
26 .Q
27 Q
28NODATA ; no wh patient data found
29 W !,"<No patient data was found.>",!
30 Q
31DATA ; Loop through TMP global
32 S (WVMGRN,WVMGRO)=""
33 F S WVMGRN=$O(^TMP($J,"WVST",WVMGRN)) Q:WVMGRN=""!(WVPOP) S WVMGR=0 F S WVMGR=$O(^TMP($J,"WVST",WVMGRN,WVMGR)) Q:'WVMGR!(WVPOP) D
34 .I WVMGRN'=WVMGRO D
35 ..W:WVMGRO="" !! ;first cm
36 ..W:WVMGRO]"" !!! ;subsequent cms
37 ..W "CASE MGR: "_WVMGRN
38 ..S WVMGRO=WVMGRN ;identify cm
39 ..Q
40 .S WVMSTN=0
41 .F S WVMSTN=$O(^TMP($J,"WVST",WVMGRN,WVMGR,WVMSTN)) Q:'WVMSTN D
42 ..S WVNAME=""
43 ..F S WVNAME=$O(^TMP($J,"WVST",WVMGRN,WVMGR,WVMSTN,WVNAME)) Q:WVNAME=""!(WVPOP) S WVDFN=0 F S WVDFN=$O(^TMP($J,"WVST",WVMGRN,WVMGR,WVMSTN,WVNAME,WVDFN)) Q:'WVDFN!(WVPOP) D
44 ...I ($Y+6)>IOSL D:WVCRT DIRZ^WVUTL3 Q:WVPOP D HDR Q:WVPOP
45 ...S WVNODE=^TMP($J,"WVST",WVMGRN,WVMGR,WVMSTN,WVNAME,WVDFN)
46 ...S WVSSN=$P(WVNODE,U,1),WVPROV=$P(WVNODE,U,2),WVVET=$P(WVNODE,U,3)
47 ...S WVEC=$P(WVNODE,U,4),WVCST=$P(WVNODE,U,5),WVDGMST=$P(WVNODE,U,6)
48 ...W !!,WVSSN,?14,WVNAME,?41,"MST= "_WVDGMST
49 ...W !,"Pr. Provider => "_WVPROV,?41,"CST= "_WVCST
50 ...W !,"Age: "_$$AGE^WVUTL9(WVDFN)_" / Veteran: "_WVVET_" / Eligibility: "_WVEC
51 ...Q
52 ..Q
53 .Q
54 Q
Note: See TracBrowser for help on using the repository browser.