Last change
on this file since 1361 was 613, checked in by George Lilly, 15 years ago |
initial load of WorldVistAEHR
|
File size:
556 bytes
|
Rev | Line | |
---|
[613] | 1 | OOPSCSN ;HINES CIOFO/WAA-Finding case number for stub record ;3/5/98
|
---|
| 2 | ;;2.0;ASISTS;;Jun 03, 2002
|
---|
| 3 | ;;
|
---|
| 4 | FYEAR(DATE) ; FIND CURRENT FISCAL YEAR FOR A GIVEN DATE
|
---|
| 5 | ; DATE IS THE DATE THAT THE DATE WAS PASSED IN.
|
---|
| 6 | N FYEAR,FYDATE
|
---|
| 7 | S FYEAR=1700+$E(DATE,1,3)
|
---|
| 8 | S FYDATE=$E(DATE,1,3)_"1001" ;FISICAL DATE IF CURRENT YEAR
|
---|
| 9 | I DATE'<FYDATE S FYEAR=FYEAR+1
|
---|
| 10 | Q FYEAR
|
---|
| 11 | ;
|
---|
| 12 | NEWR(FYEAR) ;
|
---|
| 13 | N NUM,SEQ
|
---|
| 14 | S NUM="",NUM=$O(^OOPS(2260,"B",NUM),-1)
|
---|
| 15 | I $E(NUM,1,4)'=FYEAR S NUM=FYEAR_"-00000"
|
---|
| 16 | S SEQ=+$E(NUM,6,10)
|
---|
| 17 | S SEQ=SEQ+1 F I=1:1:5-$L(SEQ) S SEQ=0_SEQ
|
---|
| 18 | S NUM=$E(NUM,1,5)_SEQ
|
---|
| 19 | Q NUM
|
---|
Note:
See
TracBrowser
for help on using the repository browser.