source: WorldVistAEHR/trunk/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPRPIU4.m@ 702

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

initial load of WorldVistAEHR

File size: 1.1 KB
RevLine 
[613]1RMPRPIU4 ;HINCIO/ODJ - APIS ;3/8/01
2 ;;3.0;PROSTHETICS;**61**;Feb 09, 1996
3 Q
4 ; Count number of issues
5 ;
6 ; Item level
7ISNI(RMPRSTN,RMPRL,RMPRH,RMPRI,RMPRSDT,RMPREDT,RMPROUP) ;
8 N RMPR6,X,X1,X2,RMPRD,RMPRS,RMPRIEN,RMPR6I
9 S RMPROUP("QUANTITY")=0
10 S RMPROUP("VALUE")=0
11 I $G(RMPREDT)="" D NOW^%DTC S RMPREDT=X ;end date def=today
12 I $G(RMPRSDT)="" D ;start date def=365 days ago
13 . S X1=RMPREDT,X2=-365 D C^%DTC
14 . S RMPRSDT=X
15 . Q
16 S RMPRD=RMPRSDT
17 F S RMPRD=$O(^RMPR(661.6,"ASTHIDS",RMPRSTN,3,RMPRH,RMPRI,RMPRD)) Q:RMPRD=""!($P(RMPRD,".",1)>RMPREDT) D
18 . S RMPRS=""
19 . F S RMPRS=$O(^RMPR(661.6,"ASTHIDS",RMPRSTN,3,RMPRH,RMPRI,RMPRD,RMPRS)) Q:RMPRS="" D
20 .. S RMPRIEN=""
21 .. F S RMPRIEN=$O(^RMPR(661.6,"ASTHIDS",RMPRSTN,3,RMPRH,RMPRI,RMPRD,RMPRS,RMPRIEN)) Q:RMPRIEN="" D
22 ... K RMPR6
23 ... S RMPR6("IEN")=RMPRIEN
24 ... S RMPRERR=$$GET^RMPRPIX6(.RMPR6)
25 ... S RMPRERR=$$ETOI^RMPRPIX6(.RMPR6,.RMPR6I)
26 ... I RMPRL'=RMPR6I("LOCATION") Q
27 ... S RMPROUP("QUANTITY")=RMPR6("QUANTITY")+RMPROUP("QUANTITY")
28 ... S RMPROUP("VALUE")=RMPR6("VALUE")+RMPROUP("VALUE")
29 ... Q
30 .. Q
31 . Q
32 Q
Note: See TracBrowser for help on using the repository browser.