source: WorldVistAEHR/trunk/r/EQUIPMENT_TURN_IN_REQUEST-PRCN/PRCN11PO.m@ 1736

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

initial load of WorldVistAEHR

File size: 1.2 KB
Line 
1PRCN11PO ;WISC/CW-post init patch 11 ;08-Nov-02
2 ;;1.0;Equipment/Turn-In Request;**11**;Sep 13, 1996
3 Q
4POST ;start post init
5 ;add line item count to file 410 if record contains line items
6 ;
7 N U,PRCNUM,PRCNIMP,PRCNLIC,PRCNFND,PRCNDA1,PRCNDA2
8 D BMES^XPDUTL(" >> Starting the Post-Initialization routine ...")
9 D MES^XPDUTL(" -> Adding LINE ITEM COUNT to file 410 ...")
10 ;
11 S U="^",(PRCNDA1,PRCNFND,PRCNUM)=0
12 F S PRCNDA1=$O(^PRCN(413,PRCNDA1)) Q:'PRCNDA1 D
13 . S PRCNIMP=$P($G(^PRCN(413,PRCNDA1,0)),U,7)
14 . ;request status in file 413.5 ;19-Approved-Funded
15 . ;39-Ready for 2237 Processing ;18-Approved-Pending Funding
16 . I (PRCNIMP'=39),(PRCNIMP'=18),(PRCNIMP'=19) Q
17 . S PRCNIMP=$P(^PRCN(413,PRCNDA1,0),U)
18 . S PRCNDA2=$O(^PRCS(410,"H",PRCNIMP,""))
19 . Q:PRCNDA2=""
20 . Q:'$D(^PRCS(410,PRCNDA2,"IT",1))
21 . Q:'$D(^PRCS(410,PRCNDA2,10))
22 . Q:$P(^PRCS(410,PRCNDA2,10),U)
23 . S PRCNFND=1
24 . S PRCNLIC=$O(^PRCS(410,PRCNDA2,"IT",99),-1),PRCNUM=PRCNUM+1
25 . S ^PRCS(410,PRCNDA2,10)=PRCNLIC_U_$P(^PRCS(410,PRCNDA2,10),U,2,99)
26 . W !!,PRCNUM_". "_"LINE ITEM COUNT "_PRCNLIC_" has been added to the entry record "_PRCNDA2_".",!
27 ;
28 I 'PRCNFND D MES^XPDUTL(" No records need to be updated!")
29 D MES^XPDUTL(" >> End of the Post-Initialization routine ...")
30 Q
Note: See TracBrowser for help on using the repository browser.