source: WorldVistAEHR/trunk/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPR29I.m@ 619

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

initial load of WorldVistAEHR

File size: 5.5 KB
RevLine 
[613]1RMPR29I ;PHX/JLT-PRINT PENDING/CLOSED/ASSIGNED [ 10/18/94 1:34 PM ]
2 ;;3.0;PROSTHETICS;;Feb 09, 1996
3PC ;REPORT 2529-3 PENDING COMPLETION
4 K QUIT D ST^RMPRDT G:$D(QUIT) EXIT
5 S DIC="^RMPR(664.1,",BY="@.01",FR=DATE(1),TO=DATE(2)
6 ;Screen DIS(0)
7 ;if not DATE DELIVERED
8 ;if STATION equal to division selected
9 ;if RECEIVING STATION not equal to division selected
10 ;if STATUS is PC
11 S DIS(0)="I '$P($G(^RMPR(664.1,D0,7)),U,2),$P(^RMPR(664.1,D0,0),U,3)=RMPR(""STA""),$P(^RMPR(664.1,D0,0),U,15)'=RMPR(""STA""),$P(^RMPR(664.1,D0,0),U,17)=""PC""" D FLDS Q
12PEN ;PENDING 2529-3s
13 ;if not DATE DELIVERED
14 ;if STATION equal to division selected
15 ;if STATUS is P
16 K QUIT D ST^RMPRDT G:$D(QUIT) EXIT
17 S DIC="^RMPR(664.1,",BY="@.01",FR=DATE(1),TO=DATE(2)
18 ;screen DIS(0)
19 S DIS(0)="I '$P($G(^RMPR(664.1,D0,7)),U,2),$P(^RMPR(664.1,D0,0),U,3)=RMPR(""STA""),$P(^RMPR(664.1,D0,0),U,17)=""P"""
20FLDS ;set flds array for call to dip
21 S FLDS="STRIPBLANKS(PATIENT);C1;""PATIENT"",.02:.01:.09;C40;""SSN"",4;C60;""WORK ORDER"""
22 S FLDS(1)="REQUESTING OFFICIAL;C1;""INITIATED BY"",.01;C40;""DATE INIT"",TODAY-DATE;C60;""#DAYS"",""WORK FOR: "";C1,2;C11;X,D DIS^RMPR29I;X;C40",FLDS(2)="6,""ITEM:"";C1;X,.01;C10;X,D ADC^RMPR29I;X,""DESC:"";C1,7;C10;W60;X"
23 S L=0,DHD=" <PENDING 2529-3s>",DHIT="D LINE^RMPR29I" D EN1^DIP
24EXIT ;common exit point
25 K BY,D0,D1,DATE,DHD,DHIT,DIC,DIS,FLDS,FR,LDAT,LP,PZD,QUIT,RA,RAT,RD0,RD1,RLAB,RRA,RVAR,RRRZ,SRC,TO,TYPE,X,Y,L
26 Q
27DIS ;DISLAY DISABILITY
28 N RR,RD
29 I $D(^RMPR(664.1,D0,1)) D
30 .W "DIS CODE: "
31 .S RR=0,RD=""
32 .F S RR=$O(^RMPR(664.1,D0,1,RR)) Q:RR'>0 D
33 ..S RD=$P(^RMPR(664.1,D0,1,RR,0),U,1)
34 ..Q:RD=""
35 ..W $P(^RMPR(662,RD,0),U)_"-"_$S($P(^RMPR(664.1,D0,1,RR,0),U,2)=1:"SC",1:"NSC") I $O(^RMPR(664.1,D0,1,RR)) W ","
36 ;see internal notes, fix on a FM problem.
37 S X=""
38 Q
39ADC ;GET AMIS CODE
40 D ADC^RMPR293(D0,D1) S X="" Q
41LINE ;WRITE A DASHED LINE
42 I $Y>5 K LP S $P(LP,"-",IOM)="" W LP
43 Q
44ASN ;ASSIGNED 2529-3s
45 K QUIT D ST^RMPRDT G:$D(QUIT) EXIT
46 S DIC="^RMPR(664.1,",BY="@.01",FR=DATE(1),TO=DATE(2),DIS(0)="I '$P($G(^RMPR(664.1,D0,7)),U,2),$P(^RMPR(664.1,D0,0),U,3)=RMPR(""STA""),$P(^RMPR(664.1,D0,0),U,17)=""A"""
47 S FLDS="STRIPBLANKS(PATIENT);C1;""PATIENT"",.02:.01:.09;C40;""SSN"",4;C60;""WORK ORDER"""
48 S FLDS(1)="REQUESTING OFFICIAL;C1;""INITIATED BY"",DATE;C40;""DATE INIT"",DATE ASSIGNED-DATE;C60;""#DAYS PENDING"";W15"
49 S FLDS(2)="""ASSIGNED BY:"";C1,ASSIGNED BY;C15;X,""DATE ASSIGNED"";C40,DATE ASSIGNED;X;C60"
50 S FLDS(3)="""WORK FOR: "";C1,2;C11;X,""ASSIGNED TO:"";C40,STRIPBLANKS(TECHNICIAN);C60;X"
51 S FLDS(4)="D DIS^RMPR29I;C1;X"
52 S FLDS(5)="6,""ITEM:"";C1;X,.01;C10;X,D LEW^RMPR29I;C40;X,D STN^RMPR29I;X,D ADC^RMPR29I;X,""DESC:"";C1,7;C10;W60;X"
53 S FLDS(6)="6,""LABOR COST:"";X;C1,5:STRIPBLANKS(TOTAL LABOR COST);X;C15,""MATERIAL COST:"";X;C24,5:STRIPBLANKS(TOTAL MATERIAL COST);X;C40,""TOTAL COST:"";X;C50,5:STRIPBLANKS(TOTAL LAB COST);X;C65"
54 S DHD=" <ASSIGNED/OPEN 2529-3s>",DHIT="D LINE^RMPR29I" D EN1^DIP
55 D EXIT Q
56LEW ;GET LAST WORK DATE ENTRY
57 N Y
58 K RVAR S LDAT(2)=0,RAT=$P($G(^RMPR(664.1,D0,2,D1,0)),U,5)
59 I +RAT F RA=0:0 S RA=$O(^RMPR(664.3,"C",RAT,RA)) Q:RA'>0 S RVAR=RA D
60 .I $D(RVAR) S LDAT(1)=$P($G(^RMPR(664.3,RVAR,0)),U) I LDAT(1)>LDAT(2) S LDAT(2)=LDAT(1)
61 I LDAT(2)=0 W "LAST WORK DATE: " Q
62 S Y=LDAT(2) D DD^%DT W "LAST WORK DATE: "_Y
63 S X=""
64 Q
65STN ;GET STATUS OF PROCUREMENT
66 S RAT=$P($G(^RMPR(664.1,D0,2,D1,0)),U,6) I +RAT F RA=0:0 S RA=$O(^RMPR(664.2,+RAT,1,RA)) Q:RA'>0 S RRA=(^(RA,0)) D
67 .I $D(^RMPR(664,+$P(RRA,U,11),0)),'$P(^(0),U,8) W !,?9,"2421 PURCHASE "_$P(RRA,U,10)_" PENDING DELIVERY"
68 .I $D(^RMPR(664.1,+$P(RRA,U,13),0)),'$P(^(0),U,26) W !,?9,"2529-3 REQUEST "_$P(RRA,U,10)_" PENDING DELIVERY"
69 S X=""
70 Q
71OCLS ;DISPLAY CLOSED REMOTE 2529-3
72 K QUIT D ST^RMPRDT G:$D(QUIT) EXIT
73 S DIC="^RMPR(664.1,",BY="@20",FR=DATE(1),TO=DATE(2),DIS(0)="I $P($G(^RMPR(664.1,D0,7)),U,2),$P(^RMPR(664.1,D0,0),U,3)=RMPR(""STA""),$P(^RMPR(664.1,D0,0),U,15)'=RMPR(""STA""),$P(^RMPR(664.1,D0,0),U,17)=""C""" D FLDSC Q
74CLS ;CLOSED 2529-3s
75 K QUIT D ST^RMPRDT G:$D(QUIT) EXIT
76 S L=0
77 S DIC="^RMPR(664.1,",BY="@20",FR=DATE(1),TO=DATE(2),DIS(0)="I $P($G(^RMPR(664.1,D0,7)),U,2),$P(^RMPR(664.1,D0,0),U,3)=RMPR(""STA""),$P(^RMPR(664.1,D0,0),U,15)=RMPR(""STA""),$P(^RMPR(664.1,D0,0),U,17)=""C"""
78 S FLDS="STRIPBLANKS(PATIENT);C1;""PATIENT"",.02:.01:.09;C40;""SSN"",4;C60;""WORK ORDER"""
79 S FLDS(1)="REQUESTING OFFICIAL;C1;""INITIATED BY"",DATE;C40;""DATE INIT"",DATE DELIVERED-DATE;C60;""#DAYS OPEN"";W15"
80 S FLDS(2)="""ASSIGNED BY:"";C1,ASSIGNED BY;C15;X,""DATE ASSIGNED"";C40,DATE ASSIGNED;X;C60"
81 S FLDS(3)="""WORK FOR: "";C1,2;C11;X,""ASSIGNED TO:"";C40,STRIPBLANKS(TECHNICIAN);C60;X"
82 S FLDS(4)="D DIS^RMPR29I;C1;X"
83 S FLDS(5)="6,""ITEM:"";C1;X,.01;C10;X,D LEW^RMPR29I;C40;X,D ADC^RMPR29I;X,""DESC:"";C1,7;C10;W60;X"
84 S FLDS(6)="6,""LABOR COST:"";X;C1,5:STRIPBLANKS(TOTAL LABOR COST);X;C15,""MATERIAL COST:"";X;C24,5:STRIPBLANKS(TOTAL MATERIAL COST);X;C40,""TOTAL COST:"";X;C50,5:STRIPBLANKS(TOTAL LAB COST);X;C65"
85 S FLDS(7)="""DELIVERY DATE"";C1;X,20;C15;X"
86 S DHD=" <CLOSED 2529-3s>",DHIT="D LINE^RMPR29I" D EN1^DIP
87 D EXIT Q
88FLDSC ;set flds array for call to dip
89 S FLDS="STRIPBLANKS(PATIENT);C1;""PATIENT"",.02:.01:.09;C40;""SSN"",4;C60;""WORK ORDER"""
90 S FLDS(1)="REQUESTING OFFICIAL;C1;""INITIATED BY"",DATE;C40;""DATE INIT"",DATE DELIVERED-DATE;C60;""#DAYS OPEN"";W15"
91 S FLDS(2)="""WORK FOR: "";C1,2;C11;X,D DIS^RMPR29I;C40;X"
92 S FLDS(3)="6,""ITEM:"";C1;X,.01;C10,D ADC^RMPR29I;X,""DESC:"";C1,7;C10;W60;X",FLDS(4)="""DELIVERY DATE"";C1;X,20;C15;X"
93 S DHD=" <CLOSED 2529-3s>",DHIT="D LINE^RMPR29I" D EN1^DIP
94 D EXIT Q
Note: See TracBrowser for help on using the repository browser.