Changeset 636 for FOIAVistA/tag/r/SCHEDULING-SD-SC/SDWLRP4.m
- Timestamp:
- Dec 4, 2009, 8:26:01 PM (14 years ago)
- Location:
- FOIAVistA/tag/r
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
FOIAVistA/tag/r/SCHEDULING-SD-SC/SDWLRP4.m
r628 r636 1 1 SDWLRP4 ;IOFO BAY PINES/TEH - WAITING LIST - MERGE RPC;06/28/2002 ; 26 Aug 2002 1:25 PM 2 ;;5.3;scheduling;**263,485,497**;AUG 13 1993;Build 3 2 ;;5.3;scheduling;**263**;AUG 13 1993;Build 4 3 ;Modified from FOIA VISTA, 4 ;Copyright 2008 WorldVistA. Licensed under the terms of the GNU 5 ;General Public License See attached copy of the License. 6 ; 7 ;This program is free software; you can redistribute it and/or modify 8 ;it under the terms of the GNU General Public License as published by 9 ;the Free Software Foundation; either version 2 of the License, or 10 ;(at your option) any later version. 11 ; 12 ;This program is distributed in the hope that it will be useful, 13 ;but WITHOUT ANY WARRANTY; without even the implied warranty of 14 ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 ;GNU General Public License for more details. 16 ; 17 ;You should have received a copy of the GNU General Public License along 18 ;with this program; if not, write to the Free Software Foundation, Inc., 19 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 3 20 ; 4 21 INPUT(SDWLRES,SDWLSTR) ; … … 83 100 ;SDWLE=4 = UNDETERMINED 84 101 ; 85 S SDWLDE=+$H,SDWLE= 0,(SDWLEE,SDWLRNED,SDWLDB)=0 D SB1102 S SDWLDE=+$H,SDWLE=1,SDWLEE=0 D SB1 86 103 G SB0:SDWLE=2 87 S SDWLRNE=$$ENROLL^EASWTAPI(SDWLDFN) G SB0:$P(SDWLRNE,U,4)="A"S SDWLRNED=$P(SDWLRNE,U,3)104 S SDWLRNE=$$ENROLL^EASWTAPI(SDWLDFN) S SDWLRNED=$P(SDWLRNE,U,3) 88 105 I SDWLRNED S X=SDWLRNED D H^%DTC S SDWLDS=%H S SDWLDE=+$H,SDWLDET=SDWLDE-SDWLDS I SDWLDET<366 S SDWLE=1 89 106 I $D(SDWLDET),SDWLDET>365 S SDWLE=3 90 107 I 'SDWLRNE S SDWLE=4 91 SB0 I $D(SDWLRNE),$P(SDWLRNE,U,4)="A" D 92 .I 'SDWLEE.SDWLEE>730!(SDWLEE=730) S SDWLE=4 Q 93 .I 'SDWLEE S SDWLE=4 Q 94 S SDWLRNE=$S(SDWLE=1:"N",SDWLE=2:"E",SDWLE=3:"P",SDWLE=4:"U",1:"U") 108 SB0 S SDWLRNE=$S(SDWLE=1:"N",SDWLE=2:"E",SDWLE=3:"P",SDWLE=4:"U") 95 109 ;-Code here for filling in 409.3 96 110 S DR="27////^S X=SDWLRNE",DIE="^SDWL(409.3,",DA=SDWLDA D ^DIE 97 S DR="27.1////^S X=$S($G(SDWLRNED):SDWLRNED,$G(SDWLD):SDWLD,1:"""")" D ^DIE98 S DR="27.2////^S X=SDWLDB" D ^DIE99 111 S DR="9////^S X=DUZ" D ^DIE K DIE,DA,DR,%H 100 K SDWLRNE,SDWLD,SDWLDE,SDWLEE,SDWLDET,DIC,DIR,DR,DIE,SDWLDS,SDWLE,SDWLRNED101 112 Q 102 SB1 I '$D(^DGCN(391.91,"B",SDWLDFN)) N SDWLDBS SDWLE=3 Q113 SB1 I '$D(^DGCN(391.91,"B",SDWLDFN)) S SDWLE=3 Q 103 114 S SDWLX="" F S SDWLX=$O(^DGCN(391.91,"B",SDWLDFN,SDWLX)) Q:SDWLX="" D 104 .S SDWLY=$G(^DGCN(391.91,SDWLX,0)) D 105 ..;CHECK FOR TREATING FACILITY 106 ..I $$TF^XUAF4(+$P(SDWLY,U,2)) D 107 ...;SORT FOR LAST TREATMENT DATE 108 ...S SDWLD=$P(SDWLY,U,3) I SDWLD S SDWLDTF(9999999-SDWLD)=SDWLX 109 I '$D(SDWLDTF) Q 110 S SDWLDTF=$O(SDWLDTF(0)) I SDWLDTF S (SDWLD,X)=9999999-SDWLDTF D H^%DTC S SDWLEE=SDWLDE-%H,SDWLDB=1 I SDWLEE<730 S SDWLE=2 111 I $D(SDWLEE),SDWLEE>730 S SDWLE=3 112 K SDWLDTF 115 .S SDWLY=$G(^DGCN(391.91,SDWLX,0)),SDWLD=$P(^(0),U,3) I SDWLD S X=SDWLD D H^%DTC S SDWLEE=SDWLDE-%H I SDWLEE<730 S SDWLE=2 116 .I $D(SDWLEE),SDWLEE>730 S SDWLE=3 113 117 Q 114 118 FDA ;Get data from SDWLSTR string and set FDA.
Note:
See TracChangeset
for help on using the changeset viewer.