source: WorldVistAEHR/trunk/r/PROSTHETICS-RMPR-RMPO-RMPS/RMPR4E23.m@ 1111

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

initial load of WorldVistAEHR

File size: 1.8 KB
RevLine 
[613]1RMPR4E23 ;HINES CIOFO/TH - PROMPT FOR SHIPMENT DATE ;08/05/03
2 ;;3.0;PROSTHETICS;**78,114,118**;Feb 09, 1996
3 ;
4 ;TH 08/05/03 Patch #78 - Add shipment date.
5 ; - DBIA #3427
6 ;
7 ; RMIFCAP = IFCAP Order
8 ; RMPRTRDT = Transaction Date from file #440.6
9 ; RMPRSHIP = Shipment Date
10 ;
11 S (RMIFCAP,RMPRTRDT,RMPRSHIP)=""
12 ; Set default to today's date
13 S RMPRTRDT=DT
14 I $D(^RMPR(664,RMPRA)) D
15 . Q:'$D(^RMPR(664,RMPRA,4))
16 . S RMIFCAP=$P(^RMPR(664,RMPRA,4),U,6) Q:RMIFCAP=""
17 . I $D(^PRCH(440.6,"PO",RMIFCAP)) D
18 . . S D1="",D1=$O(^PRCH(440.6,"PO",RMIFCAP,D1),-1) Q:D1=""
19 . . Q:'$D(^PRCH(440.6,D1,0))
20 . . S RMPRTRDT=$$GET1^DIQ(440.6,D1,6,"I")
21 S RMPRTRDT=$$FMTE^XLFDT(RMPRTRDT,"2D")
22 D GETDT,BILL,EXIT
23 Q
24 ;
25GETDT ; DIR call to obtain the shipment date
26 Q:$G(DA)=""
27 I $G(SKPSHDT)=1 D G GETDT1 ;SKPSHDT set in RMPR4E21 to auto set ship date to trans date
28 . S RMPRSHIP=DT
29 . I RMPRTRDT'="" S X=RMPRTRDT K %DT D ^%DT S RMPRSHIP=Y
30 K DIR,DIRUT
31 S DIR(0)="D",DIR("A")="Shipment Date",DIR("B")=$G(RMPRTRDT)
32 S DIR("?")="The date that the item shipped to the patient. The default"
33 S DIR("?")=DIR("?")_" date would be the transaction date from IFCAP."
34 D ^DIR
35 S RMPRSHIP=Y
36GETDT1 G:'$D(^RMPR(660,DA)) EXIT
37 G:RMPRSHIP="" EXIT
38 ; Shipment Date/Date of Service filed in file #660.
39 I DA'="" S $P(^RMPR(660,DA,1),U,8)=RMPRSHIP
40 Q
41 ;
42BILL ; File to #660.5 - ready to bill
43 Q ; taken out for phase II Billing Aware (WLC 02/26/04)
44 N DIC,X,DLAYGO,DIR
45 S DIC="^RMPR(660.5,"
46 S DIC(0)="L",X="""N"""
47 S DLAYGO=660.5 D ^DIC K DLAYGO Q:Y<1
48 S RMPRO=+Y,DIE=DIC
49 ;
50 L +^RMPR(660.5,RMPRO)
51 ; .01-Transaction Date; 2-Send Required; .02-Shipment Date
52 ; 3-ProsFile(pointer to file #660)
53 S DR=".01////^S X=DT;2////1;.02////^S X=RMPRSHIP;3////^S X=DA"
54 D ^DIE
55 L -^RMPR(660.5,RMPRO)
56 Q
57 ;
58EXIT ; Exit
59 K DA,DIC,DIE,DR,RMIFCAP,RMPRTRDT,RMPRSHIP
60 Q
Note: See TracBrowser for help on using the repository browser.