source: WorldVistAEHR/trunk/r/BAR_CODE_MED_ADMIN-ALPB-PSB/PSBSAGG.m@ 1154

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

initial load of WorldVistAEHR

File size: 1.3 KB
Line 
1PSBSAGG ;BIRMINGHAM/EFC-BCMA TEMPORARY SAGG TYPE REPORTING ;Mar 2004
2 ;;3.0;BAR CODE MED ADMIN;;Mar 2004
3 ;
4 ; Reference/IA
5 ; WIN^DGPMDDCF/1246
6 ; OPER^DGPMDDCF/1246
7 ; ^XMB(1,1,"XUS")/10091
8 ; File 4/10090
9 ; ^DIC(42/10039
10EN ;
11 N XMDUZ,XMY,XMSUB,XMTEXT,PSBEDS,PSBDT,PSB,PSBCNT,PSBWRD,D0,PSBSITE,PSBNUM
12 S X1=DT,X2=-1*(+$E(DT,6,7)) D C^%DTC
13 S PSBDT=$E(X,1,5),Y=PSBDT_"00" X ^DD("DD") S PSBDT(0)=Y
14 S PSBNUM=$P(^XMB(1,1,"XUS"),U,17)
15 S PSBSITE=$$GET1^DIQ(4,PSBNUM_",",.01)
16 S PSBNUM=$$GET1^DIQ(4,PSBNUM_",",99)
17 K ^TMP("PSBO",$J)
18 S ^TMP("PSBO",$J,1)=PSBSITE_U_PSBNUM_U_PSBDT(0)
19 F D0=0:0 S D0=$O(^DIC(42,D0)) Q:'D0 D
20 .D WIN^DGPMDDCF Q:X ; Inactive Ward
21 .D OPER^DGPMDDCF S PSBEDS=X
22 .Q:'PSBEDS ; No operating beds
23 .; Tally the med passes
24 .S PSBWRD=$P(^DIC(42,D0,0),U)
25 .S PSBCNT=0,PSB=PSBDT_"00"
26 .F S PSB=$O(^PSB("SAGG",PSBWRD,PSB)) Q:PSB=""!($P(PSB,PSBDT)]"") D
27 ..S PSBCNT=PSBCNT+^PSB("SAGG",PSBWRD,PSB)
28 .; Add to the message
29 .S Y=$O(^TMP("PSBO",$J,""),-1)+1
30 .S ^TMP("PSBO",$J,Y)=PSBWRD_U_PSBEDS_U_PSBCNT
31 S ^TMP("PSBO",$J,0)=+$O(^TMP("PSBO",$J,""),-1)
32 S XMDUZ="BCMA"
33 S XMSUB=PSBSITE_" ("_PSBDT(0)_") BCMA Med Pass Tally"
34 ;
35 ; Begin Patch PSB*1*2
36 ; DP/Topeka 7-SEP-1999 12:12:49
37 ; Changed server name per request of SAGG Team
38 S XMY("S.KMP90-BCMA-SERVER@ISC-ALBANY.VA.GOV")=""
39 ; End Patch PSB*1*2
40 ;
41 S XMTEXT="^TMP(""PSBO"",$J,"
42 D ^XMD
43 Q
44 ;
Note: See TracBrowser for help on using the repository browser.