source: WorldVistAEHR/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGPTAE03.m@ 623

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

initial load of WorldVistAEHR

File size: 1.7 KB
Line 
1DGPTAE03 ;ALB/MTC - 501 Edit Checks Cont ; 13 NOV 92
2 ;;5.3;Registration;**8,52,164**;Aug 13, 1993
3 ;
4501 ;--Check elapsed days between movements vs leave and pass days
5 ;
6 S (X2,X3,DGPTL3)=0 F DGPTL4=0:0 S DGPTL3=$O(^TMP("AEDIT",$J,"N501",DGPTL3)) Q:DGPTL3="" D
7 . S X3=$$FMDT^DGPT101($E(^TMP("AEDIT",$J,"N501",DGPTL3),31,36))_"."_$E(^TMP("AEDIT",$J,"N501",DGPTL3),37,40) I (X3<DGPTMDTS)&(X3>X2) S X2=X3
8 I X2=0 S X2=DGPTDTS
9 D ^%DTC I X>0,(X-DGPTMLD-DGPTMPD<0) S DGPTERC=543
10 K X,X1,X2,X3,DGPTL3,DGPTL4
11 Q
12 ;
13535 ;--Check elapsed days between movements vs leave and pass days
14 ;
15 S (X2,X3,DGPTL3)=0 F DGPTL4=0:0 S DGPTL3=$O(^TMP("AEDIT",$J,"N535",DGPTL3)) Q:DGPTL3="" D
16 . S X3=$$FMDT^DGPT101($E(^TMP("AEDIT",$J,"N535",DGPTL3),31,36))_"."_$E(^TMP("AEDIT",$J,"N535",DGPTL3),37,40) I (X3<DGPTTDTS)&(X3>X2) S X2=X3
17 I X2=0 S X2=DGPTDTS
18 D ^%DTC I X>0,(X-DGPTTLD-DGPTTPD<0) S DGPTERC=543
19 K X,X1,X2,X3,DGPTL3,DGPTL4
20 Q
21 ;
22SP ; Spinal injury and related diagnosis edits
23 D EDIT I DGPTERC Q
24 D DIA
25 Q
26EDIT ;
27 N FLAG,I
28 I "1234X "'[DGPTMSI S DGPTERC=509 Q
29 I DGPTSTTY="^"!(DGPTSTTY="") Q
30 I "1234X"[DGPTMSI S DGPTERC=509,FLAG=1 F I=10,11,30,40,42 S I=U_I_U I DGPTSTTY[I S DGPTERC=0,FLAG=0 Q
31 Q
32DIA ;
33 Q:(DGPTSTTY'["^10^")!(DGPTSTTY'["^11^")
34 I DGPTMSI="X"&((DGPTMD1?1"3440"1N)!(DGPTMD1=3441)!(DGPTMD2?1"3440"1N)!(DGPTMD2=3441)!(DGPTMD3?1"3440"1N)!(DGPTMD3=3441)!(DGPTMD4?1"3440"1N)!(DGPTMD4=3441)!(DGPTMD5?1"3440"1N)!(DGPTMD5=3441)) S DGPTERC=554 Q
35 I "13"[DGPTMSI&((DGPTMD1'=3441)&(DGPTMD2'=3441)&(DGPTMD3'=3441)&(DGPTMD4'=3441)&(DGPTMD5'=3441)) S DGPTERC=554 Q
36 I "24"[DGPTMSI&((DGPTMD1'?1"3440"1N)&(DGPTMD2'?1"3440"1N)&(DGPTMD3'?1"3440"1N)&(DGPTMD4'?1"3440"1N)&(DGPTMD5'?1"3440"1N)) S DGPTERC=554 Q
37 Q
38 ;
Note: See TracBrowser for help on using the repository browser.